Skip to content

Commit

Permalink
Conditionally include dirent.h and dlfcn.h
Browse files Browse the repository at this point in the history
If you do not have a filesystem or do not support dav or
dynamic loading, the corresponding header files need not
be included (some environments might not have them).
  • Loading branch information
Johan Wikman committed Nov 7, 2014
1 parent 7d236d7 commit 9786478
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,8 +1274,13 @@ typedef HANDLE process_id_t;

#else ////////////// UNIX specific defines and includes

#if !defined(MONGOOSE_NO_FILESYSTEM) &&\
(!defined(MONGOOSE_NO_DAV) || !defined(MONGOOSE_NO_DIRECTORY_LISTING))
#include <dirent.h>
#endif
#if !defined(MONGOOSE_NO_FILESYSTEM) && !defined(MONGOOSE_NO_DL)
#include <dlfcn.h>
#endif
#include <inttypes.h>
#include <pwd.h>
#define O_BINARY 0
Expand Down

0 comments on commit 9786478

Please sign in to comment.