Fix segfault from inconsistent macro use.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 8 Sep 2016 00:31:02 +0000 (17:31 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 8 Sep 2016 00:31:02 +0000 (17:31 -0700)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
cbits/HsUnix.c

index 08cccd5..7c72a34 100644 (file)
@@ -110,7 +110,7 @@ char *__hscore_d_name( struct dirent* d )
 
 void __hscore_free_dirent(struct dirent *dEnt)
 {
-#if HAVE_READDIR_R
+#if HAVE_READDIR_R && USE_READDIR_R
   free(dEnt);
 #endif
 }