diff options
author | tobik <tobik@FreeBSD.org> | 2018-06-06 20:29:15 +0800 |
---|---|---|
committer | tobik <tobik@FreeBSD.org> | 2018-06-06 20:29:15 +0800 |
commit | 463d0d9c28440dc0823f9751ed5ac3a8be2fcc3f (patch) | |
tree | c98116e9fc0149fde0a9a53f996475342ad02f51 | |
parent | e7275e64a733ad5af1ee8a5d7992c0ad2a8ccd58 (diff) | |
download | freebsd-ports-gnome-463d0d9c28440dc0823f9751ed5ac3a8be2fcc3f.tar.gz freebsd-ports-gnome-463d0d9c28440dc0823f9751ed5ac3a8be2fcc3f.tar.zst freebsd-ports-gnome-463d0d9c28440dc0823f9751ed5ac3a8be2fcc3f.zip |
sysutils/aimage: Unbreak build with Clang 6
- Also fix build with LibreSSL: The configure script checks that
libssl has ssl3_new() which LibreSSL doesn't have but aimage itself
never uses it, so pretend it's there to pass the check.
PR: 228756
Reported by: Chris Hutchinson <portmaster@bsdforge.com>
Submitted by: tobik
Approved by: Chris Hutchinson <portmaster@bsdforge.com> (maintainer)
-rw-r--r-- | sysutils/aimage/Makefile | 4 | ||||
-rw-r--r-- | sysutils/aimage/files/patch-src_aimage.cpp | 8 | ||||
-rw-r--r-- | sysutils/aimage/files/patch-src_imager.cpp | 15 |
3 files changed, 23 insertions, 4 deletions
diff --git a/sysutils/aimage/Makefile b/sysutils/aimage/Makefile index 91c92267b8ac..2cc602834f3f 100644 --- a/sysutils/aimage/Makefile +++ b/sysutils/aimage/Makefile @@ -11,11 +11,15 @@ MAINTAINER= portmaster@BSDforge.com COMMENT= Advanced Disk Imager LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libafflib.so:sysutils/afflib USES= gmake readline ssl GNU_CONFIGURE= yes +# Pretend ssl3_new exists for LibreSSL. It's never really used but +# configure checks for it. +CONFIGURE_ARGS= ac_cv_lib_ssl_ssl3_new=yes PLIST_FILES= bin/aimage diff --git a/sysutils/aimage/files/patch-src_aimage.cpp b/sysutils/aimage/files/patch-src_aimage.cpp index c72eb8f554c6..9817fb2157ac 100644 --- a/sysutils/aimage/files/patch-src_aimage.cpp +++ b/sysutils/aimage/files/patch-src_aimage.cpp @@ -1,6 +1,6 @@ ---- src/aimage.cpp.orig 2018-02-26 16:24:29.829120000 -0800 -+++ src/aimage.cpp 2018-02-26 16:25:21.187218000 -0800 -@@ -344,7 +344,7 @@ +--- src/aimage.cpp.orig 2010-12-17 13:49:50 UTC ++++ src/aimage.cpp +@@ -344,7 +344,7 @@ void segwrite_callback(struct affcallback_info *acbi) /* log if necessary */ if(logfile){ fprintf(logfile, @@ -9,7 +9,7 @@ acbi->pagenum, acbi->bytes_to_write, acbi->bytes_written, -@@ -621,7 +621,7 @@ +@@ -621,7 +621,7 @@ int64 scaled_atoi(const char *arg) int64 ret=0; int multiplier=1; char ch,junk; diff --git a/sysutils/aimage/files/patch-src_imager.cpp b/sysutils/aimage/files/patch-src_imager.cpp new file mode 100644 index 000000000000..f180244cbf4f --- /dev/null +++ b/sysutils/aimage/files/patch-src_imager.cpp @@ -0,0 +1,15 @@ +imager.cpp:857:8: error: value of type '__bind<int &, sockaddr *, unsigned long>' is not contextually convertible to 'bool' + if(bind(sock,(sockaddr *)&local,sizeof(local))) err(1,"bind"); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--- src/imager.cpp.orig 2018-06-05 06:55:20 UTC ++++ src/imager.cpp +@@ -854,7 +854,7 @@ int imager::socket_listen(int port) + #endif + local.sin_family = AF_INET; + local.sin_port = htons(port); // listen on requested port. +- if(bind(sock,(sockaddr *)&local,sizeof(local))) err(1,"bind"); ++ if(::bind(sock,(sockaddr *)&local,sizeof(local))) err(1,"bind"); + if(listen(sock,0)) err(1,"listen"); // listen, and only accept one + printf("Listening for connection on port %d...\n",port); + in = accept(sock,(sockaddr *)&remote,&rsize); |