summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Makefile3
-rw-r--r--src/dump.c2
-rw-r--r--src/main.c2
-rw-r--r--src/main.h5
4 files changed, 12 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index f47c5b0..d1421c5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,6 +2,7 @@ include ../config.mk
OBJ=main.o hexdump.o dump.o flash.o serial.o qmode.o
OBJ+=fpid.o query.o pieces.o utils.o console.o
OBJ+=squeue/squeue.o
+OBJ+=image.o fiasco.o device.o usb-device.o cold-flash.o
BIN=0xFFFF
#LIBS=`${HAVE_USB} && echo -- '-lusb'`
LIBS=`if [ "${HAVE_USB}" = 1 ]; then echo '-lusb'; fi`
@@ -13,6 +14,8 @@ USBOBJ+=../libusb/linux.o ## XXX not portable
CFLAGS+=-I../libusb
LDFLAGS+=-L../libusb
+CFLAGS+=-D_GNU_SOURCE
+
all: ${BIN}
${BIN}: ${OBJ}
diff --git a/src/dump.c b/src/dump.c
index 9fc0a86..9ff18be 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -68,7 +68,9 @@ __rf_extract_exit:
/*
* This function was covardly copied from nanddump.c @ mtd-utils-20060907
*/
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/src/main.c b/src/main.c
index 0761da2..ea8748c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,6 +37,8 @@ int rd_mode = -1;
int rd_flags = -1;
int usb_mode = -1;
int root_device = -1;
+int simulate = 0;
+int noverify = 0;
int verbose = 0;
int identify = 0;
int moboreboot = 0;
diff --git a/src/main.h b/src/main.h
index ccc72f7..5577253 100644
--- a/src/main.h
+++ b/src/main.h
@@ -6,8 +6,13 @@
#include "os.h"
extern char strbuf[1024];
+#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
+#endif
+
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
// Forward declaration for use in function arguments.
//struct devices;