Opened 3 years ago

Closed 3 years ago

#63279 closed defect (fixed)

mod_dnssd @0.6: error: implicit declaration of function 'unixd_setup_child' is invalid in C99

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: bigsur catalina Cc:
Port: mod_dnssd

Description

Another victim of -Werror=implicit-function-declaration being on by default now:

make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_dnssd/mod_dnssd/work/mod_dnssd-0.6/src'
/opt/local/bin/apxs -c -Wc,"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/opt/local/include/apr-1 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -std=c99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline" -D_REENTRANT -Wl,"-L/opt/local/lib -lapr-1 -lpthread " -L/opt/local/lib -lavahi-common -lavahi-client ./mod_dnssd.c
/opt/local/share/apr-1/build/libtool --silent --mode=compile --tag=CC /usr/bin/clang -prefer-pic -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK  -I/opt/local/include/apache2  -I/opt/local/include/apr-1   -I/opt/local/include/apr-1 -I/opt/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/opt/local/include/apr-1 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -std=c99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -D_REENTRANT  -c -o ./mod_dnssd.lo ./mod_dnssd.c && touch ./mod_dnssd.slo
./mod_dnssd.c:406:18: warning: cast from 'char *' to 'char **' increases required alignment from 1 to 8 [-Wcast-align]
    txt_record = (char **) j->txt_record->elts;
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mod_dnssd.c:433:21: warning: cast from 'char *' to 'char **' increases required alignment from 1 to 8 [-Wcast-align]
        for (type = (char**) j->types->elts; *type; type++) {
                    ^~~~~~~~~~~~~~~~~~~~~~~
./mod_dnssd.c:579:5: error: implicit declaration of function 'unixd_setup_child' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    unixd_setup_child();
    ^
./mod_dnssd.c:906:12: warning: missing field 'func' initializer [-Wmissing-field-initializers]
    { NULL }
           ^
./mod_dnssd.c:917:1: warning: missing field 'flags' initializer [-Wmissing-field-initializers]
};
^
4 warnings and 1 error generated.
apxs:Error: Command failed with rc=65536
.
make[2]: *** [mod_dnssd.la] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_dnssd/mod_dnssd/work/mod_dnssd-0.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_dnssd/mod_dnssd/work/mod_dnssd-0.6'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_dnssd/mod_dnssd/work/mod_dnssd-0.6'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_mod_dnssd/mod_dnssd/work/mod_dnssd-0.6" && /usr/bin/make -j16 -w all 
Exit code: 2
Error: Failed to build mod_dnssd: command execution failed
DEBUG: Error code: CHILDSTATUS 57616 2

Change History (2)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newaccepted

unixd_setup_child was renamed to ap_unixd_setup_child in Apache 2.4 per https://httpd.apache.org/docs/2.4/developer/new_api_2_4.html.

On pre-Xcode 12 systems the port would have built but would have crashed when Apache tried to load it.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In da8eb57566fea87f1447a56de7b8e8827fb6844e/macports-ports (master):

mod_dnssd: Update for Apache 2.4

Closes: #63279

Also modernize checksums and use notes instead of post-activate ui_msg.

Note: See TracTickets for help on using tickets.