yaffs direct: Fix pthread compilation issue.
authorCharles Manning <cdhmanning@gmail.com>
Mon, 29 Nov 2010 00:16:54 +0000 (13:16 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 29 Nov 2010 00:16:54 +0000 (13:16 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/basic-test/Makefile
direct/basic-test/yaffs_osglue.c

index a4207aa..cc9094e 100644 (file)
@@ -30,6 +30,9 @@ CFLAGS+=   -Werror=strict-prototypes -Werror=missing-parameter-type
 CFLAGS+=   -Werror=redundant-decls -Werror=nested-externs -Winline
 CFLAGS+=   -Werror=undef
 
+CFLAGS+=   -DCONFIG_YAFFS_USE_PTHREADS -lpthread
+
+
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
index 1496383..6e8870b 100644 (file)
@@ -39,7 +39,7 @@ int yaffsfs_GetLastError(void)
 
 
 #ifdef CONFIG_YAFFS_USE_PTHREADS
-#include <pthreads.h>
+#include <pthread.h>
 static pthread_mutex_t mutex1;
 
 
@@ -55,7 +55,7 @@ void yaffsfs_Unlock(void)
 
 void yaffsfs_LockInit(void)
 {
-       pthread_mutex_init( &mutex, NULL);
+       pthread_mutex_init( &mutex1, NULL);
 }
 
 #else