Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Dec 2022 18:06:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268302] astro/cfitsio: fix build with clang 15
Message-ID:  <bug-268302-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268302

            Bug ID: 268302
           Summary: astro/cfitsio: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

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 =3D gethostbyname(localhost);
                        ^
  drvrnet.c:3887:21: error: incompatible integer to pointer conversion
assigning to 'struct hostent *' from 'int' [-Wint-conversion]
              hostent =3D gethostbyname(localhost);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning and 1 error generated.

This is because the configure script defines _XOPEN_SOURCE=3D700, for uncle=
ar
reasons, and this hides the gethostbyname() declaration in
/usr/include/netdb.h. Fix it by removing the line that adds the define.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268302-7788>