aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-12-10 18:03:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-12-18 17:32:40 +0000
commit7eda11c87c30c735058e9393d54b631a74cf566a (patch)
treee4ef7d02b0e29aefabbeef304cc3a3cb26a3f01a /astro
parentf2f3ab67ff127029f70393a05f2f8e560d70ccb4 (diff)
downloadports-7eda11c87c30c735058e9393d54b631a74cf566a.tar.gz
ports-7eda11c87c30c735058e9393d54b631a74cf566a.zip
astro/cfitsio: fix build with clang 15
During an exp-run for llvm 15 (see bug 265425), it turned out that astro/cfitsio failed to build with clang 15: drvrnet.c:3887:23: warning: call to undeclared function 'gethostbyname'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] hostent = gethostbyname(localhost); ^ drvrnet.c:3887:21: error: incompatible integer to pointer conversion assigning to 'struct hostent *' from 'int' [-Wint-conversion] hostent = gethostbyname(localhost); ^ ~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. This is because the configure script defines _XOPEN_SOURCE=700, for unclear reasons, and this hides the gethostbyname() declaration in /usr/include/netdb.h. Fix it by removing the line that adds the define. PR: 268302 Approved by: portmgr (tcberner) MFH: 2022Q4
Diffstat (limited to 'astro')
-rw-r--r--astro/cfitsio/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/astro/cfitsio/Makefile b/astro/cfitsio/Makefile
index f2ad34c31b6d..988bdbf15325 100644
--- a/astro/cfitsio/Makefile
+++ b/astro/cfitsio/Makefile
@@ -30,6 +30,7 @@ OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/*.[chl]
+ @${REINPLACE_CMD} -e '/#define _XOPEN_SOURCE 700/d' ${WRKSRC}/configure
do-install:
cd ${WRKSRC}/ && ${INSTALL_DATA} drvrsmem.h fitsio.h fitsio2.h longnam.h ${STAGEDIR}${PREFIX}/include/