Fix build on Ubuntu 12.04
authornorly <ny-git@enpas.org>
Tue, 12 Feb 2013 15:37:21 +0000 (15:37 +0000)
committernorly <ny-git@enpas.org>
Thu, 21 Feb 2013 19:51:49 +0000 (19:51 +0000)
Thanks to Cristian Cadar.

Makefile
src/lookup/first-section-in-segment.c
src/lookup/last-section-in-segment.c
src/lookup/section-name.c

index 726b92af7935ac51716def9c993676bf0b522457..9e07a474857cd578c5d18a1524aeb2f184db3a00 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ debug: $(EXE)
 
 $(EXE): $(OBJS)
        @if [ ! -d $(BUILDDIR) ] ; then echo "Error: Build dir '$(BUILDDIR)' does not exist." ; false ; fi
-       gcc $(LDFLAGS) -o $@ $^
+       gcc -o $@ $^ $(LDFLAGS)
 
 
 $(BUILDDIR)/$(SRCDIR)/%.o: $(SRCDIR)/%.c $(HEADERS)
index b66c518d4fbc391ece7607c6840d764cc5cd877c..833563d76964a41dbcb406f00405cb8ff5f32a61 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
 #include <libelf.h>
 #include <gelf.h>
 
index 0e78263948c9ef8b0e6a2665f8d2424f081523b7..964e854a678cf8db2be52b8f30eef6f46508c229 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
 #include <libelf.h>
 #include <gelf.h>
 
index d3748f9fd8929cf59bb2935fe38a47bf5e7d37b8..1365eb6c25e09e784bc8bd3e41abb6e5bb5a3803 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
 #include <libelf.h>
 #include <gelf.h>