Skip to content

Commit

Permalink
Try to make a sane default for CD detection path by platform.
Browse files Browse the repository at this point in the history
This is so this can work even when dropping PhysicsFS into another project
 without CMake doing header tests and filling in the defines.
  • Loading branch information
icculus committed Mar 20, 2012
1 parent 2486105 commit 8037308
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platform_unix.c
Expand Up @@ -21,6 +21,14 @@
#include <time.h>
#include <errno.h>

#if PHYSFS_PLATFORM_LINUX && !defined(PHYSFS_HAVE_MNTENT_H)
#define PHYSFS_HAVE_MNTENT_H 1
#elif PHYSFS_PLATFORM_SOLARIS && !defined(PHYSFS_HAVE_SYS_MNTTAB_H)
#define PHYSFS_HAVE_SYS_MNTTAB_H 1
#elif PHYSFS_PLATFORM_BSD && !defined(PHYSFS_HAVE_SYS_UCRED_H)
#define PHYSFS_HAVE_SYS_UCRED_H 1
#endif

#ifdef PHYSFS_HAVE_SYS_UCRED_H
# ifdef PHYSFS_HAVE_MNTENT_H
# undef PHYSFS_HAVE_MNTENT_H /* don't do both... */
Expand Down

0 comments on commit 8037308

Please sign in to comment.