From 2fc438ca139f6780fe6fd51c83201165472841a9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 1 Nov 2000 06:31:29 +0000 Subject: [PATCH] hopefully fix Fragman's compilation problems on Mandrake 6.1 --- acconfig.h | 3 +++ configure.in | 9 +++++++++ source/quakefs.c | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/acconfig.h b/acconfig.h index cfdf3fc..4911dbe 100644 --- a/acconfig.h +++ b/acconfig.h @@ -97,5 +97,8 @@ /* Define this to something sane if you don't have stricmp */ #undef stricmp +/* Define this if fnmatch is prototyped in fnmatch.h */ +#undef HAVE_FNMATCH_PROTO + @BOTTOM@ #endif // _CONFIG_H diff --git a/configure.in b/configure.in index d8be30c..c3c5392 100644 --- a/configure.in +++ b/configure.in @@ -80,6 +80,15 @@ AC_HEADER_TIME AC_STRUCT_TM AC_C_BIGENDIAN +AC_MSG_CHECKING(that fnmatch is in fnmatch.h) +AC_TRY_COMPILE( + [#include ], + [int (*foo)() = fnmatch;], + AC_DEFINE(HAVE_FNMATCH_PROTO) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) +) + AC_MSG_CHECKING(for socklen_t in sys/types.h) AC_TRY_COMPILE( [#include ], diff --git a/source/quakefs.c b/source/quakefs.c index 5f1973f..a682e32 100644 --- a/source/quakefs.c +++ b/source/quakefs.c @@ -68,6 +68,10 @@ #endif #include +#ifndef HAVE_FNMATCH_PROTO +fnmatch (__const char *__pattern, __const char *__string, int __flags); +#endif + extern qboolean is_server;