Re: compiling m4 on RHEL6 beta
Eric Blake <[email protected]> Thu, 27 May 2010 15:43:17 -0600
| Newsgroups | gmane.comp.gnu.m4.patches,gmane.comp.gnu.m4.bugs |
|---|---|
| Organization | Red Hat |
| Message-ID | <[email protected]> |
On 05/27/2010 01:23 PM, Todd Rinaldo wrote: > Today, I ran into an issue compiling m4 on RHEL6 beta. I had to apply this patch to make it work or I got errors about S_ISDIR not being defined during linking. Any ideas why this was an issue? Thanks for the report. Most likely, this is an actual bug in m4 relying on the laziness of older systems that implicitly included <sys/stat.h> inside other headers; contrasted with recent glibc which has intentionally been tightening down system headers to avoid such namespace pollution. POSIX states that <fcntl.h> may, but not must, include <sys/stat.h>; and it looks like m4.h had another include path that included <fcntl.h> but not explicitly <sys/stat.h>. > > diff --git a/src/path.c b/src/path.c > index 682969d..e5870ae 100644 > --- a/src/path.c > +++ b/src/path.c > @@ -22,6 +22,7 @@ > /* Handling of path search of included files via the builtins "include" > and "sinclude". */ > > +#include "sys/stat.h" > #include "m4.h" Your patch is not quite correct, since m4.h MUST come first to avoid conflicts between <config.h> and gnulib replacements for other system headers. But adding "sys/stat.h" after m4.h, or as part of m4.h, will indeed fix the problem. I'll apply this on the development branches shortly (not sure whether this warrants 1.4.15, or whether this will wait until 1.6). -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org _______________________________________________ M4-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/m4-patches
signature.asc
(application/pgp-signature, 619 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJL/ud1AAoJEKeha0olJ0Nq/a0H/jIT7RSjT6gVi2O4ZgJMB2c4 tRJBYNjVPdJQIVB9gjrNnjeJqSSH/sI+uVCMA4mtsbl0u/EwcWEXAZnbC5cmb7Sk 3OBMDmdniXyPZaEufHUDlxymaesyHfL0WHPbO9UtT8B0+KfSGIKHdTnXH5K7V+aZ 1XhHnR5xPIOCs79ku9xWlBJaelzzswcrFtjBRZtpea2NRMszd8d+DxB+eYNhwnPn WbS+xqNWxhKboC6yTeKvxO6bF+KdxkF9+r/akuFiTZRBJEcEhmBMO202UCSvIoqv ZBQTTxvEXBdUhg+DXE4fPk5DxT7yc+VjYlRmtAEJ8oUu5iUKAFGzoHF0hqNMJZ0= =sHaK -----END PGP SIGNATURE-----