[BACK]Return to patch-lib_bch.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / sysutils / u-boot-pinebook / patches

File: [cvs.NetBSD.org] / pkgsrc / sysutils / u-boot-pinebook / patches / patch-lib_bch.c (download)

Revision 1.3, Sun Feb 18 12:27:20 2018 UTC (12 months ago) by jmcneill
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, HEAD
Changes since 1.2: +2 -2 lines

u-boot-pinebook: update to 2018.01

$NetBSD: patch-lib_bch.c,v 1.3 2018/02/18 12:27:20 jmcneill Exp $

--- lib/bch.c.orig	2018-01-23 06:50:34.000000000 +0000
+++ lib/bch.c
@@ -61,8 +61,11 @@
 #include <linux/bitops.h>
 #else
 #include <errno.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 #include <sys/endian.h>
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+#define htobe32 htonl
 #else
 #include <endian.h>
 #endif
@@ -117,7 +120,7 @@ struct gf_poly_deg1 {
 };
 
 #ifdef USE_HOSTCC
-#if !defined(__DragonFly__) && !defined(__FreeBSD__)
+#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__APPLE__)
 static int fls(int x)
 {
 	int r = 32;