EAPI="5"
-inherit toolchain-funcs
+inherit toolchain-funcs eutils
MY_PV=${PV/_beta/b}
S=${WORKDIR}/${PN}
src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.7.1-headers.patch
sed -i \
-e 's:__LINUX__:__linux__:' \
*.[ch] */*.[ch] || die
doit() { echo "$@"; "$@"; }
src_compile() {
- doit $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} \
+ # Need _GNU_SOURCE here for asprintf prototype.
+ doit $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} \
extract-xiso.c libftp-*/*.c -o extract-xiso || die
}
--- /dev/null
+fix missing prototype warnings
+
+--- a/libftp-5.0.1.modified.by.in/FtpLibrary.h
++++ b/libftp-5.0.1.modified.by.in/FtpLibrary.h
+@@ -20,6 +20,7 @@
+ extern "C" {
+ #endif
+
++#include <ctype.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+@@ -33,6 +34,7 @@
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <arpa/ftp.h>
++#include <arpa/inet.h>
+ #include <arpa/telnet.h>
+ #include <netinet/in.h>
+ #include <netdb.h>