OSDN Git Service

Added header-availability check.
authorKentaro Sato <kentaro@ps.catv.ne.jp>
Sat, 9 Oct 2004 07:37:55 +0000 (07:37 +0000)
committerKentaro Sato <kentaro@ps.catv.ne.jp>
Sat, 9 Oct 2004 07:37:55 +0000 (07:37 +0000)
utils/support.c

index e036260..54941a3 100644 (file)
@@ -731,7 +731,9 @@ int stat(const char *filename, struct stat *st)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
 #include <string.h>
 
 /*
@@ -783,7 +785,9 @@ strlcpy(char *dst, const char *src, size_t siz)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
 #include <string.h>
 
 /*