diff lib/portability.h @ 1600:ce22ad7a26c1 draft

Work with buildroot's extensively patched uClibc, and for nommu support move xfork() to portability.h and #ifdef based on __uClinux__ (which seems to be the nommu compiler define).
author Rob Landley <rob@landley.net>
date Thu, 04 Dec 2014 21:46:59 -0600
parents e85e5f3b87c2
children aafd2f28245a
line wrap: on
line diff
--- a/lib/portability.h	Thu Dec 04 21:41:12 2014 -0600
+++ b/lib/portability.h	Thu Dec 04 21:46:59 2014 -0600
@@ -72,13 +72,28 @@
 // any flag newer than MS_MOVE, which was added in 2001 (linux 2.5.0.5),
 // eleven years earlier.
 
+#include <sys/mount.h>
+#ifndef MS_MOVE
 #define MS_MOVE       (1<<13)
+#endif
+#ifndef MS_REC
 #define MS_REC        (1<<14)
+#endif
+#ifndef MS_SILENT
 #define MS_SILENT     (1<<15)
+#endif
+#ifndef MS_UNBINDABLE
 #define MS_UNBINDABLE (1<<17)
+#endif
+#ifndef MS_PRIVATE
 #define MS_PRIVATE    (1<<18)
+#endif
+#ifndef MS_SLAVE
 #define MS_SLAVE      (1<<19)
+#endif
+#ifndef MS_SHARED
 #define MS_SHARED     (1<<20)
+#endif
 
 // When building under obsolete glibc (Ubuntu 8.04-ish), hold its hand a bit.
 #elif __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
@@ -206,3 +221,9 @@
 typedef float FLOAT;
 #endif
 
+#ifndef __uClinux__
+pid_t xfork(void);
+#endif
+
+//#define strncpy(...) @@strncpyisbadmmkay@@
+//#define strncat(...) @@strcatisbadmmkay@@