Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF

From: Bruno Haible <[email-masked]>
Date: Tue, 26 Jun 2012 19:48:27 +0200

Joachim Schmitz wrote:
> Also 2 small fixes for C99

Thanks for these. Indeed, the 'argp' and 'regex' modules use strcasecmp()
and should therefore depend 'strcase' (already done) and include <strings.h>
(done through patch below).

2012-06-26  Bruno Haible  <[email-masked]>

	argp, regex: Ensure strcasecmp gets declared.
	* lib/argp-help.c: Include <strings.h>.
	* lib/regex_internal.h: Likewise.
	Reported and suggested by Joachim Schmitz <[email-masked]>.

--- lib/argp-help.c.orig	Tue Jun 26 19:44:50 2012
+++ lib/argp-help.c	Tue Jun 26 19:42:04 2012
@@ -29,6 +29,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <assert.h>
 #include <stdarg.h>
 #include <ctype.h>
--- lib/regex_internal.h.orig	Tue Jun 26 19:44:50 2012
+++ lib/regex_internal.h	Tue Jun 26 19:42:56 2012
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include <langinfo.h>
 #ifndef _LIBC