This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/252] hsearch_data is not usable with sizeof() as
- From: "damien_mattei at yahoo dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 3 Jul 2004 15:00:38 -0000
- Subject: [Bug libc/252] hsearch_data is not usable with sizeof() as
- References: <20040702165219.252.damien_mattei@yahoo.com>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From damien_mattei at yahoo dot com 2004-07-03 15:00 -------
(In reply to comment #3)
> No, it works just fine. Try:
> #define _GNU_SOURCE
> #include <search.h>
>
> struct hsearch_data htab_ports;
>
> int main (void)
> {
> memset (&htab_ports, 0, sizeof (struct hsearch_data));
> /* or */
> memset (&htab_ports, 0, sizeof (htab_ports));
> }
>
i already test this before submitting a bug.
i try now with #define _GNU_SOURCE in the source code of my program which is not
really pretty.. and on my linux redhat 9.0 box it still doesn't compile
complaining about an incomplete type and unknow size:
snif.c:502: « htab_ports » a un type incomplet
[...]
snif.c: Dans la fonction « main »:
snif.c:2061: sizeof appliqué sur un type incomplet
[...]
snif.c: Au niveau supérieur:
snif.c:157: taille de stockage de « htab_ports » n'est pas connue
[...]
make: *** [snif] Erreur 1
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=252
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.