Permalink
Browse files

fix up a bit

  • Loading branch information...
1 parent 98e82f5 commit b43f8ea3f623409871772e4e6df3c691d13319c2 @bwalex committed Jul 20, 2011
Showing with 17 additions and 5 deletions.
  1. +2 −5 Makefile
  2. +5 −0 generic_xts.c
  3. +5 −0 pbkdf2-gcrypt.c
  4. +5 −0 pbkdf2-openssl.c
View
7 Makefile
@@ -2,13 +2,10 @@ WARNFLAGS= -Wsystem-headers -Werror -Wall -W -Wno-unused-parameter \
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
-Wold-style-definition -Wreturn-type -Wcast-qual -Wwrite-strings \
-Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts \
- -Winline -Wnested-externs -Wredundant-decls
-
-# for linux...
-WARNFLAGS_LINUX= -Wall
+ -Winline -Wnested-externs
linux:
- gcc -O0 $(WARNFLAGS_LINUX) -g main.c tcplay.c crc32.c safe_mem.c io.c crypto.c generic_xts.c crypto-gcrypt.c pbkdf2-openssl.c hdr.c humanize.c -o tc-play -lgcrypt -lcrypto -ldevmapper -luuid
+ gcc -O0 $(WARNFLAGS) -g main.c tcplay.c crc32.c safe_mem.c io.c crypto.c generic_xts.c crypto-gcrypt.c pbkdf2-openssl.c hdr.c humanize.c -o tc-play -lgcrypt -lcrypto -ldevmapper -luuid
all:
gcc -O0 $(WARNFLAGS) -g main.c tcplay.c crc32.c safe_mem.c io.c crypto.c generic_xts.c crypto-dev.c pbkdf2-openssl.c hdr.c humanize.c -o tc-play -lcrypto -ldm -lprop
lib:
View
5 generic_xts.c
@@ -18,6 +18,11 @@
* PURPOSE.
*/
+#if defined(__linux__)
+#define _GNU_SOURCE
+#define __USE_GNU
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
View
5 pbkdf2-gcrypt.c
@@ -27,6 +27,11 @@
* SUCH DAMAGE.
*/
+#if defined(__linux__)
+#define _GNU_SOURCE
+#define __USE_GNU
+#endif
+
#include <errno.h>
#include <gcrypt.h>
View
5 pbkdf2-openssl.c
@@ -27,6 +27,11 @@
* SUCH DAMAGE.
*/
+#if defined(__linux__)
+#define _GNU_SOURCE
+#define __USE_GNU
+#endif
+
#include <errno.h>
#include <openssl/evp.h>

0 comments on commit b43f8ea

Please sign in to comment.