iNot yet Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2010-08-04
Initial Package Version: 1.4.14
Upstream Status: unknown
Origin: http://cgit.openembedded.net/cgit.cgi/openembedded/commit/?id=368b4b672f58009cd76cb9c8e87f217e5c222668
Description: Fixes the following build failure -

 path.c:118:7: warning: implicit declaration of function 'fstat'
 path.c:118:7: warning: implicit declaration of function 'S_ISDIR'
 ...
 path.o: In function `m4_fopen':
 path.c:(.text+0x3a): undefined reference to `S_ISDIR'

 I assume this is either caused by gcc-4.5.1 or glibc-2.12, but since nobody
here seems to see it with gcc-4.5.1 and glibc-2.11, it must be glibc.

 According to the original (which patches a 'recipe') -

The build error was a link failure not finding S_ISDIR which is a macro provided
for the stat syscall..


Index: m4-1.4.14/src/path.c
===================================================================
--- m4-1.4.14.orig/src/path.c
+++ m4-1.4.14/src/path.c
@@ -24,6 +24,11 @@

 #include "m4.h"

+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+
 struct includes
 {
 struct includes *next; /* next directory to search */


