DAVID MONNIAUX wrote:
grep.c should #include <strings.h> because it uses strcasecmp, and POSIX says it is 
declared in <strings.h>

Thanks for reporting that. I fixed it as part of installing the attached 
patches.
>From 5bb06952f630adae012d9be6a342a6def2774fff Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 2 Feb 2019 22:42:49 -0800
Subject: [PATCH 1/2] build: update gnulib submodule to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index 5b490ef..3043e43 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 5b490ef07f257a5dd41fc0b351c1a387b8a8f89c
+Subproject commit 3043e43a7c30516482725c69b36f8feb4846f819
-- 
2.17.1

>From f9400e622c46c122c703a9d5f5f6c95c3192014d Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 2 Feb 2019 22:46:52 -0800
Subject: [PATCH 2/2] grep: fix grep.c includes

* src/grep.c: Include strings.h; problem reported by David
Monniaux (Bug#34285).  Do not include fcntl.h, as system.h does
that for us.h
---
 src/grep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/grep.c b/src/grep.c
index e53b8cd..fcc07b8 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -22,10 +22,10 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <wchar.h>
-#include <fcntl.h>
 #include <inttypes.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <strings.h>
 #include "system.h"
 
 #include "argmatch.h"
-- 
2.17.1

Reply via email to