summaryrefslogtreecommitdiff
path: root/src/mtd_probe/mtd_probe.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-03-22 18:07:36 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-03-22 18:07:36 -0400
commit974354dee5f5abdea22958c3d57f41d9425f1a8c (patch)
treedd41833061190721b495b575d108b1bd3a2b552e /src/mtd_probe/mtd_probe.c
parentac73951d246e035b92771bdddc2892bdabeed760 (diff)
Revisit issue #87: fails to build on linux headers 3.13
Dropping <fcntl.h> in favor of <linux/fcntl.h> is incorrect. Yet uClibc needs O_CLOEXEC from <linux/fcntl.h>. So we re-introduce <fcntl.h> and include <linux/fcntl.h> only on uClibc systems to avoid redefinitions. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/mtd_probe/mtd_probe.c')
-rw-r--r--src/mtd_probe/mtd_probe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mtd_probe/mtd_probe.c b/src/mtd_probe/mtd_probe.c
index bab2e8e97e..ffba0eb51f 100644
--- a/src/mtd_probe/mtd_probe.c
+++ b/src/mtd_probe/mtd_probe.c
@@ -22,9 +22,13 @@
#include <mtd/mtd-user.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
+
+#ifdef __UCLIBC__
#include <linux/fcntl.h>
+#endif
int main(int argc, char** argv)
{