diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk index 420d72c79d..8aa58aceef 100644 --- a/package/quagga/quagga.mk +++ b/package/quagga/quagga.mk @@ -18,6 +18,11 @@ QUAGGA_CONF_OPTS = \ --sysconfdir=/etc/quagga \ --localstatedir=/var/run/quagga +# quagga has its own internal copy of getopt_long. To avoid conflicts with libc's +# getopt, we need to make sure that the getopt function itself is also built. +QUAGGA_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -DREALLY_NEED_PLAIN_GETOPT" + ifeq ($(BR2_PACKAGE_LIBCAP),y) QUAGGA_CONF_OPTS += --enable-capabilities QUAGGA_DEPENDENCIES += libcap