fix more compile errors
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 23:46:08 +0000 (00:46 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 23:46:08 +0000 (00:46 +0100)
Makefile
file.c
libuci.c

index 65a38c776ab333a4923f0138bdd487a14a023562..766fccbd6cf11ee301513d4277ec7481bf370341 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,9 @@ ifeq ($(OS),Darwin)
   SHLIB_EXT=dylib
   SHLIB_FLAGS=-dylib
 else
+  LD=gcc
   SHLIB_EXT=so
-  SHLIB_FLAGS=-shared -Wl,soname,$(SHLIB_FILE)
+  SHLIB_FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
 endif
 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
 
diff --git a/file.c b/file.c
index ae58fbc6ed9982c495aa84e8fa3f7260b60782dd..803e912b833f742961bebc3acdff0c797159b871 100644 (file)
--- a/file.c
+++ b/file.c
  * This file contains the code for parsing uci config files
  */
 
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/file.h>
 #include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
index 51ce7dad7994bef1569c0d636a5f573dc67e998f..d4ef8d86656884ed629fc4c454b8e3f837f916d0 100644 (file)
--- a/libuci.c
+++ b/libuci.c
@@ -16,6 +16,7 @@
  * This file contains some common code for the uci library
  */
 
+#define _GNU_SOURCE
 #include <sys/types.h>
 #include <stdbool.h>
 #include <string.h>