comparison lib/portability.h @ 1459:240bd13db413 draft

Work around uClibc brain-damage.
author Rob Landley <rob@landley.net>
date Sat, 06 Sep 2014 13:24:58 -0500
parents 00c20f410c46
children ca340df928bc
comparison
equal deleted inserted replaced
1458:4428d64c0c40 1459:240bd13db413
72 // uClibc pretends to be glibc and copied a lot of its bugs, but has a few more 72 // uClibc pretends to be glibc and copied a lot of its bugs, but has a few more
73 #if defined(__UCLIBC__) 73 #if defined(__UCLIBC__)
74 #include <unistd.h> 74 #include <unistd.h>
75 #include <stdio.h> 75 #include <stdio.h>
76 ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream); 76 ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
77
78 // uClibc's last-ever release was in 2012, so of course it doesn't define
79 // any flag newer than MS_MOVE, which was added in 2001 (linux 2.5.0.5),
80 // eleven years earlier.
81
82 #define MS_MOVE (1<<13)
83 #define MS_REC (1<<14)
84 #define MS_SILENT (1<<15)
85 #define MS_UNBINDABLE (1<<17)
86 #define MS_PRIVATE (1<<18)
87 #define MS_SLAVE (1<<19)
88 #define MS_SHARED (1<<20)
77 89
78 // When building under obsolete glibc (Ubuntu 8.04-ish), hold its hand a bit. 90 // When building under obsolete glibc (Ubuntu 8.04-ish), hold its hand a bit.
79 #elif __GLIBC__ == 2 && __GLIBC_MINOR__ < 10 91 #elif __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
80 #define fstatat fstatat64 92 #define fstatat fstatat64
81 int fstatat64(int dirfd, const char *pathname, void *buf, int flags); 93 int fstatat64(int dirfd, const char *pathname, void *buf, int flags);