Subject: libnbcompat poll changes break in FreeBSD.
To: None <tech-pkg@NetBSD.org>
From: Juan RP <juan@xtraeme.unixbsd.org>
List: tech-pkg
Date: 04/23/2004 01:19:18
--Signature=_Fri__23_Apr_2004_01_19_18_+0200_GUEyExMia1+X+qwH
Content-Type: multipart/mixed;
boundary="Multipart=_Fri__23_Apr_2004_01_19_18_+0200_GSxtcilw8hFb/VXc"
--Multipart=_Fri__23_Apr_2004_01_19_18_+0200_GSxtcilw8hFb/VXc
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Hi,
I was trying to update pkg_install on FreeBSD, but libnbcompat has failed
with a message like "redefinition of `struct pollfd'". I think the
problem is that HAVE_POLL is not declared in the autoconf checks, and
HAVE_POLL_H/HAVE_SYS_POLL_H are inside of this, so nbcompat/poll.h is used
instead AFAIK.
The following patch fixes the problem...
The error log was that:
===> Building for pkg_install-20040421
[...]
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\"
-DTAR_CMD=\"/usr/pkg/bin/tar\"-DFTP_CMD=\"/usr/pkg/bin/ftp\"
-I/home/juan/pkgsrc_temp/pkgtools/pkg_install/work/libnbcompat
-DDEF_UMASK=0022 -I. -I. -O2 -c ftpio.c
In file included from ftpio.c:87: /usr/include/sys/poll.h:45:
error: redefinition of `struct pollfd'
*** Error code 1
--
Juan RP <juan@xtraeme.unixbsd.org>
--Multipart=_Fri__23_Apr_2004_01_19_18_+0200_GSxtcilw8hFb/VXc
Content-Type: application/octet-stream;
name="libnbcompat-fix.diff"
Content-Disposition: attachment;
filename="libnbcompat-fix.diff"
Content-Transfer-Encoding: base64
SW5kZXg6IGZpbGVzL2NvbmZpZ3VyZS5hYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvY3Zzcm9vdC9w
a2dzcmMvcGtndG9vbHMvbGlibmJjb21wYXQvZmls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IGZpbGVzL25iY29tcGF0L2NvbmZpZy5oLmluICAyMiBBcHIgMjAwNCAyMzowMDozMiAtMDAw
MApAQCAtMTg1LDYgKzE4NSwxMCBAQAogLyogRGVmaW5lIHRvIDEgaWYgeW91IGhhdmUgdGhlIDxw
YXRocy5oPiBoZWFkZXIgZmlsZS4gKi8KICN1bmRlZiBIQVZFX1BBVEhTX0gKIAorLyogRGVmaW5l
IHRvIDEgaWYgeW91IGhhdmUgdGhlIHBvbGwoKSBmdW5jdGlvbi4gKi8KKworI3VuZGVmIEhBVkVf
UE9MTAorCiAvKiBEZWZpbmUgdG8gMSBpZiB5b3UgaGF2ZSB0aGUgPHBvbGwuaD4gaGVhZGVyIGZp
bGUuICovCiAjdW5kZWYgSEFWRV9QT0xMX0gK
--Multipart=_Fri__23_Apr_2004_01_19_18_+0200_GSxtcilw8hFb/VXc--
--Signature=_Fri__23_Apr_2004_01_19_18_+0200_GUEyExMia1+X+qwH
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFAiFL4ypkLYVDran0RAsU9AKCsYFtHeXyP0h0uFTHRpvDdnUGxbgCgz/tH
kN1xbFN6dhErbwfjKgUdMEg=
=juzI
-----END PGP SIGNATURE-----
--Signature=_Fri__23_Apr_2004_01_19_18_+0200_GUEyExMia1+X+qwH--