* [PATCH] usb_id: fix warning (undefined _GNU_SOURCE)
@ 2008-08-12 22:01 Karel Zak
2008-08-13 10:05 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Karel Zak @ 2008-08-12 22:01 UTC (permalink / raw)
To: linux-hotplug
usb_id.c: In function ‘set_str’:
usb_id.c:69 warning: implicit declaration of function ‘strnlen’
IMHO this patch is workaround. The correct way is to use "-include
$(top_builddir)/config.h" as a gcc option. I'll submit a patch with
this solution later.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
| 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
--git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c
index 5b78b97..53a952b 100644
--- a/extras/usb_id/usb_id.c
+++ b/extras/usb_id/usb_id.c
@@ -11,6 +11,8 @@
* Free Software Foundation version 2 of the License.
*/
+#include "../../config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb_id: fix warning (undefined _GNU_SOURCE)
2008-08-12 22:01 [PATCH] usb_id: fix warning (undefined _GNU_SOURCE) Karel Zak
@ 2008-08-13 10:05 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2008-08-13 10:05 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2008-08-13 at 00:01 +0200, Karel Zak wrote:
> usb_id.c: In function ‘set_str’:
> usb_id.c:69 warning: implicit declaration of function ‘strnlen’
I did add the include already locally.
> IMHO this patch is workaround. The correct way is to use "-include
> $(top_builddir)/config.h" as a gcc option. I'll submit a patch with
> this solution later.
Yeah, makes sense, so we can remove all the includes and ifdefs in a
whole bunch of files.
Thanks,
Kay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-13 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12 22:01 [PATCH] usb_id: fix warning (undefined _GNU_SOURCE) Karel Zak
2008-08-13 10:05 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).