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 a4207aac9beaadc1c3a88baa5ce35d9758665482..cc9094e647b13d01f557686dcb6ffdd764594421 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+=   -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 \
 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 14963839b23a2180e8f4b49515ad4d155e7565f6..6e8870b1780dc52aa669ef54cffe8b66e8783ccf 100644 (file)
@@ -39,7 +39,7 @@ int yaffsfs_GetLastError(void)
 
 
 #ifdef CONFIG_YAFFS_USE_PTHREADS
 
 
 #ifdef CONFIG_YAFFS_USE_PTHREADS
-#include <pthreads.h>
+#include <pthread.h>
 static pthread_mutex_t mutex1;
 
 
 static pthread_mutex_t mutex1;
 
 
@@ -55,7 +55,7 @@ void yaffsfs_Unlock(void)
 
 void yaffsfs_LockInit(void)
 {
 
 void yaffsfs_LockInit(void)
 {
-       pthread_mutex_init( &mutex, NULL);
+       pthread_mutex_init( &mutex1, NULL);
 }
 
 #else
 }
 
 #else