diff mbox

Remove dependency on fmatch.h if it does not exit

Message ID 20180202074455.GD1669@rink.nu (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Rink Springer Feb. 2, 2018, 7:44 a.m. UTC
[ Ugh; forgot to attach patch - apologies, I need more coffee ]

Dear all,

Attached is a trivial patch that removes the assumption that fnmatch.h
is available - the configure script already checks for fnmatch(3) and
supplies its own implementation if necessary, but fnmatch.h is always
included.

Let me know what you think.

Regards,
Rink

Comments

Herbert Xu March 10, 2018, 8:03 a.m. UTC | #1
On Fri, Feb 02, 2018 at 08:44:55AM +0100, Rink Springer wrote:
> [ Ugh; forgot to attach patch - apologies, I need more coffee ]
> 
> Dear all,
> 
> Attached is a trivial patch that removes the assumption that fnmatch.h
> is available - the configure script already checks for fnmatch(3) and
> supplies its own implementation if necessary, but fnmatch.h is always
> included.
> 
> Let me know what you think.
> 
> Regards,
> Rink
> 
> Do not assume we can include fnmatch.h
> 
> Signed-off-by: Rink Springer <rink@rink.nu>

Patch applied.  Thanks.
diff mbox

Patch

Do not assume we can include fnmatch.h

Signed-off-by: Rink Springer <rink@rink.nu>

diff --git a/src/expand.c b/src/expand.c
index 2a50830..1ab5757 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -45,7 +45,9 @@ 
 #include <inttypes.h>
 #include <limits.h>
 #include <string.h>
+#ifdef HAVE_FNMATCH
 #include <fnmatch.h>
+#endif
 #ifdef HAVE_GLOB
 #include <glob.h>
 #endif