[MacPorts] #55835: mdnsd fails to build on macOS Sierra 10.12.6: make: *** [mhttp] Error 1

MacPorts noreply at macports.org
Fri Feb 16 18:20:37 UTC 2018


#55835: mdnsd fails to build on macOS Sierra 10.12.6: make: *** [mhttp] Error 1
------------------------+-------------------
 Reporter:  jdgoettsch  |      Owner:
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:
 Keywords:              |       Port:  mdnsd
------------------------+-------------------
 macOS Sierra 10.12.6 with Xcode 9.2:

 {{{
 $ uname -a
 Darwin ARE-STATIC-247.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan
 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
 }}}

 Here is the output. I'll attach the specified log file.

 {{{
 $ sudo port selfupdate
 Password:
 --->  Updating MacPorts base sources using rsync
 MacPorts base version 2.4.2 installed,
 MacPorts base version 2.4.2 downloaded.
 --->  Updating the ports tree
 --->  MacPorts base is already the latest version

 The ports tree has been updated. To upgrade your installed ports, you
 should run
   port upgrade outdated

 $ sudo port upgrade outdated

 ...

 $ sudo port clean mdnsd
 --->  Cleaning mdnsd

 $ sudo port -d install mdnsd
 DEBUG: Copying /Users/jeff/Library/Preferences/com.apple.dt.Xcode.plist to
 /opt/local/var/macports/home/Library/Preferences
 DEBUG: Changing to port directory:
 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/mdnsd
 DEBUG: OS darwin/16.7.0 (Mac OS X 10.12) arch i386
 DEBUG: universal_variant is false, so not adding the default universal
 variant
 DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
 DEBUG: Finished running callback
 portconfigure::add_automatic_compiler_dependencies
 DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
 DEBUG: Finished running callback
 portbuild::add_automatic_buildsystem_dependencies
 DEBUG: Attempting ln -sf
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work
 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/net/mdnsd/work
 DEBUG: dropping privileges: euid changed to 503, egid changed to 501.
 DEBUG: Starting logging for mdnsd
 DEBUG: mdnsd has no conflicts
 DEBUG: Executing org.macports.main (mdnsd)
 DEBUG: dropping privileges: euid changed to 503, egid changed to 501.
 DEBUG: archivefetch phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Fetching archive for mdnsd
 DEBUG: Executing org.macports.archivefetch (mdnsd)
 DEBUG: euid/egid changed to: 0/0
 DEBUG: chowned /opt/local/var/macports/incoming to macports
 DEBUG: euid/egid changed to: 503/501
 --->  mdnsd-0.7G_0.darwin_16.x86_64.tbz2 doesn't seem to exist in
 /opt/local/var/macports/incoming/verified
 --->  Attempting to fetch mdnsd-0.7G_0.darwin_16.x86_64.tbz2 from
 https://packages.macports.org/mdnsd
   % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                  Dload  Upload   Total   Spent    Left
 Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
 0
 DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
 Found
 --->  Attempting to fetch mdnsd-0.7G_0.darwin_16.x86_64.tbz2 from
 http://sea.us.packages.macports.org/macports/packages/mdnsd
   % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                  Dload  Upload   Total   Spent    Left
 Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
 0
 DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
 Found
 --->  Attempting to fetch mdnsd-0.7G_0.darwin_16.x86_64.tbz2 from
 http://ywg.ca.packages.macports.org/mirror/macports/packages/mdnsd
   % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                  Dload  Upload   Total   Spent    Left
 Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--
 0
 DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
 Found
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: fetch phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Fetching distfiles for mdnsd
 DEBUG: Executing org.macports.fetch (mdnsd)
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: checksum phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Verifying checksums for mdnsd
 DEBUG: Executing org.macports.checksum (mdnsd)
 --->  Checksumming mdnsd-0.7G.tar.gz
 DEBUG: Calculated (md5) is 3692107785567b0eff6cec979506da3b
 DEBUG: Correct (md5) checksum for mdnsd-0.7G.tar.gz
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: extract phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Extracting mdnsd
 DEBUG: Executing org.macports.extract (mdnsd)
 --->  Extracting mdnsd-0.7G.tar.gz
 DEBUG: setting option extract.args to
 '/opt/local/var/macports/distfiles/mdnsd/mdnsd-0.7G.tar.gz'
 DEBUG: Environment:
 CC_PRINT_OPTIONS='YES'
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/.CC_PRINT_OPTIONS'
 CPATH='/opt/local/include'
 LIBRARY_PATH='/opt/local/lib'
 MACOSX_DEPLOYMENT_TARGET='10.12'
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work"
 && /usr/bin/gzip -dc
 '/opt/local/var/macports/distfiles/mdnsd/mdnsd-0.7G.tar.gz' | /usr/bin/tar
 -xf -
 DEBUG: system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work"
 && /usr/bin/gzip -dc
 '/opt/local/var/macports/distfiles/mdnsd/mdnsd-0.7G.tar.gz' | /usr/bin/tar
 -xf -
 DEBUG: euid/egid changed to: 0/0
 DEBUG: chowned
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work
 to macports
 DEBUG: euid/egid changed to: 503/501
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: patch phase started at Fri Feb 16 10:12:44 PST 2018
 DEBUG: Executing org.macports.patch (mdnsd)
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: configure phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Configuring mdnsd
 DEBUG: Preferred compilers: clang macports-clang-4.0 macports-clang-3.9
 DEBUG: Using compiler 'Xcode Clang'
 DEBUG: Executing org.macports.configure (mdnsd)
 DEBUG: Privilege de-escalation not attempted as not running as root.
 DEBUG: build phase started at Fri Feb 16 10:12:44 PST 2018
 --->  Building mdnsd
 DEBUG: Executing org.macports.build (mdnsd)
 DEBUG: Environment:
 CC_PRINT_OPTIONS='YES'
 CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/.CC_PRINT_OPTIONS'
 CPATH='/opt/local/include'
 LIBRARY_PATH='/opt/local/lib'
 MACOSX_DEPLOYMENT_TARGET='10.12'
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/mdnsd-0.7G"
 && /usr/bin/make -j8 -w all
 DEBUG: system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/mdnsd-0.7G"
 && /usr/bin/make -j8 -w all
 make: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/mdnsd-0.7G'
 gcc -g -o mquery mquery.c mdnsd.c 1035.c
 gcc -g -o mhttp mhttp.c mdnsd.c 1035.c sdtxt.c xht.c
 mquery.c:18:9: warning: implicitly declaring library function 'printf'
 with type 'int (const char *, ...)' [-Wimplicit-function-declaration]
         printf("A %s for %d seconds to ip
 %s\n",a->name,now,inet_ntoa(a->ip));
         ^
 mquery.c:18:9: note: include the header <stdio.h> or explicitly provide a
 declaration for 'printf'
 mquery.c:18:61: warning: implicit declaration of function 'inet_ntoa' is
 invalid in C99 [-Wimplicit-function-declaration]
         printf("A %s for %d seconds to ip
 %s\n",a->name,now,inet_ntoa(a->ip));
                                                             ^
 mquery.c:18:61: warning: format specifies type 'char *' but the argument
 has type 'int' [-Wformat]
         printf("A %s for %d seconds to ip
 %s\n",a->name,now,inet_ntoa(a->ip));
                                           ~~
 ^~~~~~~~~~~~~~~~
                                           %d
 mquery.c:29:1: warning: control reaches end of non-void function
 [-Wreturn-type]
 }
 ^
 mquery.c:39:5: warning: implicitly declaring library function 'bzero' with
 type 'void (void *, unsigned long)' [-Wimplicit-function-declaration]
     bzero(&in, sizeof(in));
     ^
 mquery.c:39:5: note: include the header <strings.h> or explicitly provide
 a declaration for 'bzero'
 mquery.c:49:52: warning: implicit declaration of function 'close' is
 invalid in C99 [-Wimplicit-function-declaration]
     if(bind(s,(struct sockaddr*)&in,sizeof(in))) { close(s); return 0; }
                                                    ^
 mquery.c:51:31: warning: implicit declaration of function 'inet_addr' is
 invalid in C99 [-Wimplicit-function-declaration]
     mc.imr_multiaddr.s_addr = inet_addr("224.0.0.251");
                               ^
 mquery.c:37:16: warning: implicit conversion from 'int' to 'char' changes
 value from 255 to -1 [-Wconstant-conversion]
     char ttl = 255;
          ~~~   ^~~
 mquery.c:77:69: error: non-void function 'main' should return a value
 [-Wreturn-type]
     if(argc != 3) { printf("usage: mquery 12 _http._tcp.local.\n");
 return; }
                                                                     ^
 mquery.c:80:65: warning: implicitly declaring library function 'strerror'
 with type 'char *(int)' [-Wimplicit-function-declaration]
     if((s = msock()) == 0) { printf("can't create socket:
 %s\n",strerror(errno)); return 1; }
                                                                 ^
 mquery.c:80:65: note: include the header <string.h> or explicitly provide
 a declaration for 'strerror'
 mquery.c:82:27: warning: implicit declaration of function 'atoi' is
 invalid in C99 [-Wimplicit-function-declaration]
     mdnsd_query(d,argv[2],atoi(argv[1]),ans,0);
                           ^
 mquery.c:93:84: warning: passing 'int *' to parameter of type 'socklen_t
 *' (aka 'unsigned int *') converts between pointers to integer types with
 different sign [-Wpointer-sign]
             while((bsize = recvfrom(s,buf,MAX_PACKET_LEN,0,(struct
 sockaddr*)&from,&ssize)) > 0)
 ^~~~~~
 /usr/include/sys/socket.h:693:25: note: passing argument to parameter here
                 socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom);
                                       ^
 11 warnings and 1 error generated.
 mhttp.c:14:5: warning: implicitly declaring library function 'printf' with
 type 'int (const char *, ...)' [-Wimplicit-function-declaration]
     printf("conflicting name detected %s for type %d\n",name,type);
     ^
 mhttp.c:14:5: note: include the header <stdio.h> or explicitly provide a
 declaration for 'printf'
 mhttp.c:15:5: warning: implicitly declaring library function 'exit' with
 type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-
 declaration]
     exit(1);
     ^
 mhttp.c:15:5: note: include the header <stdlib.h> or explicitly provide a
 declaration for 'exit'
 mhttp.c:26:5: warning: implicit declaration of function 'write' is invalid
 in C99 [-Wimplicit-function-declaration]
     write(_zzz[1]," ",1);
     ^
 mhttp.c:37:5: warning: implicitly declaring library function 'bzero' with
 type 'void (void *, unsigned long)' [-Wimplicit-function-declaration]
     bzero(&in, sizeof(in));
     ^
 mhttp.c:37:5: note: include the header <strings.h> or explicitly provide a
 declaration for 'bzero'
 mhttp.c:47:52: warning: implicit declaration of function 'close' is
 invalid in C99 [-Wimplicit-function-declaration]
     if(bind(s,(struct sockaddr*)&in,sizeof(in))) { close(s); return 0; }
                                                    ^
 mhttp.c:49:31: warning: implicit declaration of function 'inet_addr' is
 invalid in C99 [-Wimplicit-function-declaration]
     mc.imr_multiaddr.s_addr = inet_addr("224.0.0.251");
                               ^
 mhttp.c:35:16: warning: implicit conversion from 'int' to 'char' changes
 value from 255 to -1 [-Wconstant-conversion]
     char ttl = 255;
          ~~~   ^~~
 mhttp.c:79:91: error: non-void function 'main' should return a value
 [-Wreturn-type]
     if(argc < 4) { printf("usage: mhttp 'unique name' 12.34.56.78 80
 '/optionalpath'\n"); return; }
 ^
 mhttp.c:82:12: warning: implicit declaration of function 'atoi' is invalid
 in C99 [-Wimplicit-function-declaration]
     port = atoi(argv[3]);
            ^
 mhttp.c:83:87: warning: implicit declaration of function 'inet_ntoa' is
 invalid in C99 [-Wimplicit-function-declaration]
     printf("Announcing .local site named '%s' to %s:%d and extra path
 '%s'\n",argv[1],inet_ntoa(ip),port,argv[4]);
 ^
 mhttp.c:83:87: warning: format specifies type 'char *' but the argument
 has type 'int' [-Wformat]
     printf("Announcing .local site named '%s' to %s:%d and extra path
 '%s'\n",argv[1],inet_ntoa(ip),port,argv[4]);
                                                  ~~
 ^~~~~~~~~~~~~
                                                  %d
 mhttp.c:89:5: warning: implicit declaration of function 'pipe' is invalid
 in C99 [-Wimplicit-function-declaration]
     pipe(_zzz);
     ^
 mhttp.c:91:65: warning: implicitly declaring library function 'strerror'
 with type 'char *(int)' [-Wimplicit-function-declaration]
     if((s = msock()) == 0) { printf("can't create socket:
 %s\n",strerror(errno)); return 1; }
                                                                 ^
 mhttp.c:91:65: note: include the header <string.h> or explicitly provide a
 declaration for 'strerror'
 mhttp.c:93:5: warning: implicitly declaring library function 'sprintf'
 with type 'int (char *, const char *, ...)' [-Wimplicit-function-
 declaration]
     sprintf(hlocal,"%s._http._tcp.local.",argv[1]);
     ^
 mhttp.c:93:5: note: include the header <stdio.h> or explicitly provide a
 declaration for 'sprintf'
 mhttp.c:93:13: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     sprintf(hlocal,"%s._http._tcp.local.",argv[1]);
             ^~~~~~
 mhttp.c:94:13: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     sprintf(nlocal,"http-%s.local.",argv[1]);
             ^~~~~~
 mhttp.c:96:24: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     mdnsd_set_host(d,r,hlocal);
                        ^~~~~~
 ./mdnsd.h:82:46: note: passing argument to parameter 'name' here
 void mdnsd_set_host(mdnsd d, mdnsdr r, char *name);
                                              ^
 mhttp.c:97:24: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     r = mdnsd_unique(d,hlocal,QTYPE_SRV,600,con,0);
                        ^~~~~~
 ./mdnsd.h:72:36: note: passing argument to parameter 'host' here
 mdnsdr mdnsd_unique(mdnsd d, char *host, int type, long int ttl, void
 (*conflict)(char *host, int type, void *arg), void *arg);
                                    ^
 mhttp.c:98:32: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     mdnsd_set_srv(d,r,0,0,port,nlocal);
                                ^~~~~~
 ./mdnsd.h:84:81: note: passing argument to parameter 'name' here
 void mdnsd_set_srv(mdnsd d, mdnsdr r, int priority, int weight, int port,
 char *name);
 ^
 mhttp.c:99:24: warning: passing 'unsigned char [256]' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     r = mdnsd_unique(d,nlocal,QTYPE_A,600,con,0);
                        ^~~~~~
 ./mdnsd.h:72:36: note: passing argument to parameter 'host' here
 mdnsdr mdnsd_unique(mdnsd d, char *host, int type, long int ttl, void
 (*conflict)(char *host, int type, void *arg), void *arg);
                                    ^
 mhttp.c:100:23: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     mdnsd_set_raw(d,r,(unsigned char *)&ip,4);
                       ^~~~~~~~~~~~~~~~~~~~
 ./mdnsd.h:81:45: note: passing argument to parameter 'data' here
 void mdnsd_set_raw(mdnsd d, mdnsdr r, char *data, int len);
                                             ^
 mhttp.c:101:24: warning: passing 'unsigned char [256]' to parameter of
 type 'char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     r = mdnsd_unique(d,hlocal,16,600,con,0);
                        ^~~~~~
 ./mdnsd.h:72:36: note: passing argument to parameter 'host' here
 mdnsdr mdnsd_unique(mdnsd d, char *host, int type, long int ttl, void
 (*conflict)(char *host, int type, void *arg), void *arg);
                                    ^
 mhttp.c:103:32: warning: implicitly declaring library function 'strlen'
 with type 'unsigned long (const char *)' [-Wimplicit-function-declaration]
     if(argc == 5 && argv[4] && strlen(argv[4]) > 0)
 xht_set(h,"path",argv[4]);
                                ^
 mhttp.c:103:32: note: include the header <string.h> or explicitly provide
 a declaration for 'strlen'
 mhttp.c:106:23: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     mdnsd_set_raw(d,r,packet,len);
                       ^~~~~~
 ./mdnsd.h:81:45: note: passing argument to parameter 'data' here
 void mdnsd_set_raw(mdnsd d, mdnsdr r, char *data, int len);
                                             ^
 mhttp.c:107:5: warning: implicit declaration of function 'free' is invalid
 in C99 [-Wimplicit-function-declaration]
     free(packet);
     ^
 mhttp.c:118:36: warning: implicit declaration of function 'read' is
 invalid in C99 [-Wimplicit-function-declaration]
         if(FD_ISSET(_zzz[0],&fds)) read(_zzz[0],buf,MAX_PACKET_LEN);
                                    ^
 mhttp.c:122:84: warning: passing 'int *' to parameter of type 'socklen_t
 *' (aka 'unsigned int *') converts between pointers to integer types with
 different sign [-Wpointer-sign]
             while((bsize = recvfrom(s,buf,MAX_PACKET_LEN,0,(struct
 sockaddr*)&from,&ssize)) > 0)
 ^~~~~~
 /usr/include/sys/socket.h:693:25: note: passing argument to parameter here
                 socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom);
                                       ^
 26 warnings and 1 error generated.
 mdnsd.c:98:58: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if((type == c->rr.type || type == 255) && strcmp(c->rr.name, host)
 == 0)
                                                          ^~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:107:41: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if(type == r->rr.type && strcmp(r->rr.name, host) == 0)
                                         ^~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:116:34: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(rr->rdname) len += strlen(rr->rdname); // worst case
                                  ^~~~~~~~~~
 /usr/include/string.h:82:28: note: passing argument to parameter '__s'
 here
 size_t   strlen(const char *__s);
                             ^
 mdnsd.c:124:15: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(strcmp(r->name,a->name) || r->type != a->type) return 0;
               ^~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:124:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(strcmp(r->name,a->name) || r->type != a->type) return 0;
                       ^~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:125:40: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(r->type == QTYPE_SRV && !strcmp(r->known.srv.name,a->rdname) &&
 a->srv.port == r->known.srv.port && a->srv.weight == r->known.srv.weight
 && a->srv.priority == r->known.srv.priority) return 1;
                                        ^~~~~~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:125:58: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(r->type == QTYPE_SRV && !strcmp(r->known.srv.name,a->rdname) &&
 a->srv.port == r->known.srv.port && a->srv.weight == r->known.srv.weight
 && a->srv.priority == r->known.srv.priority) return 1;
                                                          ^~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:126:91: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if((r->type == QTYPE_PTR || r->type == QTYPE_NS || r->type ==
 QTYPE_CNAME) && !strcmp(a->rdname,r->known.ns.name)) return 1;
 ^~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:126:101: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if((r->type == QTYPE_PTR || r->type == QTYPE_NS || r->type ==
 QTYPE_CNAME) && !strcmp(a->rdname,r->known.ns.name)) return 1;
 ^~~~~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:98:58: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if((type == c->rr.type || type == 255) && strcmp(c->rr.name, host)
 == 0)
                                                          ^~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:107:41: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if(type == r->rr.type && strcmp(r->rr.name, host) == 0)
                                         ^~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:116:34: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(rr->rdname) len += strlen(rr->rdname); // worst case
                                  ^~~~~~~~~~
 /usr/include/string.h:82:28: note: passing argument to parameter '__s'
 here
 size_t   strlen(const char *__s);
                             ^
 mdnsd.c:186:27: warning: implicitly declaring library function 'malloc'
 with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
     u = (struct unicast *)malloc(sizeof(struct unicast));
                           ^
 mdnsd.c:186:27: note: include the header <stdlib.h> or explicitly provide
 a declaration for 'malloc'
 mdnsd.c:124:15: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(strcmp(r->name,a->name) || r->type != a->type) return 0;
               ^~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:124:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(strcmp(r->name,a->name) || r->type != a->type) return 0;
                       ^~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:201:15: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
     while(cur = _c_next(d,cur,q->name,q->type))
           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:125:40: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(r->type == QTYPE_SRV && !strcmp(r->known.srv.name,a->rdname) &&
 a->srv.port == r->known.srv.port && a->srv.weight == r->known.srv.weight
 && a->srv.priority == r->known.srv.priority) return 1;
                                        ^~~~~~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:125:58: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if(r->type == QTYPE_SRV && !strcmp(r->known.srv.name,a->rdname) &&
 a->srv.port == r->known.srv.port && a->srv.weight == r->known.srv.weight
 && a->srv.priority == r->known.srv.priority) return 1;
                                                          ^~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:201:15: note: place parentheses around the assignment to silence
 this warning
     while(cur = _c_next(d,cur,q->name,q->type))
               ^
           (                                   )
 mdnsd.c:201mdnsd.c::15126:: 91note::  use '==' to turn this assignment
 into an equality comparisonwarning
 : passing 'unsigned char *' to parameter of type 'const char *' converts
 between pointers to integer types with different sign [-Wpointer-sign]
     while(cur = _c_next(d,cur,q->name,q->type))
               ^
               ==
     if((r->type == QTYPE_PTR || r->type == QTYPE_NS || r->type ==
 QTYPE_CNAME) && !strcmp(a->rdname,r->known.ns.name)) return 1;
 ^~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:126:101: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     if((r->type == QTYPE_PTR || r->type == QTYPE_NS || r->type ==
 QTYPE_CNAME) && !strcmp(a->rdname,r->known.ns.name)) return 1;
 ^~~~~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:211:13: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
     while(c = _c_next(d,c,q->name,q->type)) c->q = 0;
           ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:211:13: note: place parentheses around the assignment to silence
 this warning
     while(c = _c_next(d,c,q->name,q->type)) c->q = 0;
             ^
           (                               )
 mdnsd.c:211:13: note: use '==' to turn this assignment into an equality
 comparison
     while(c = _c_next(d,c,q->name,q->type)) c->q = 0;
             ^
             ==
 mdnsd.c:222:5: warning: implicit declaration of function 'free' is invalid
 in C99 [-Wimplicit-function-declaration]
     free(q->name);
     ^
 mdnsd.c:229:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     int i = _namehash(r->rr.name) % SPRIME;
                       ^~~~~~~~~~
 mdnsd.c:67:27: note: passing argument to parameter 's' here
 int _namehash(const char *s)
                           ^
 mdnsd.c:249:17: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     r->conflict(r->rr.name,r->rr.type,r->arg);
                 ^~~~~~~~~~
 mdnsd.c:186:27: warning: implicitly declaring library function 'malloc'
 with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
     u = (struct unicast *)malloc(sizeof(struct unicast));
                           ^
 mdnsd.c:186:27: note: include the header <stdlib.h> or explicitly provide
 a declaration for 'malloc'
 mdnsd.c:201:15: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
     while(cur = _c_next(d,cur,q->name,q->type))
           ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:201:15: note: place parentheses around the assignment to silence
 this warning
     while(cur = _c_next(d,cur,q->name,q->type))
               ^
           (                                   )
 mdnsd.c:201:15: note: use '==' to turn this assignment into an equality
 comparison
     while(cur = _c_next(d,cur,q->name,q->type))
               ^
               ==
 mdnsd.c:287:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     int i = _namehash(r->name) % LPRIME;
                       ^~~~~~~
 mdnsd.c:67:27: note: passing argument to parameter 's' here
 int _namehash(const char *s)
                           ^
 mdnsd.c:291:31: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
                               ^~~~~~~
 mdnsd.c:93:57: note: passing argument to parameter 'host' here
 struct cached *_c_next(mdnsd d, struct cached *c, char *host, int type)
                                                         ^
 mdnsd.c:291:17: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
               ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:211:13: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
 mdnsd.c:291    while(c = _c_next(d,c,q->name,q->type)) c->q = 0;
           ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 :17: note: place parentheses around the assignment to silence this warning
 mdnsd.c:211:13: note: place parentheses around the assignment to silence
 this warning
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
                 ^
     while(c = _c_next(d,c,q->name,q->type)) c->q = 0;              (
 )

             ^
           (                               )
 mdnsd.c:291mdnsd.c::17211:: 13note::  use '==' to turn this assignment
 into an equality comparisonnote
 : use '==' to turn this assignment into an equality comparison
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;    while(c
 = _c_next(d,c,q->name,q->type)) c->q = 0;

                 ^            ^

                 ==            ==

 mdnsd.c:297:31: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         while(c = _c_next(d,c,r->name,r->type))
                               ^~~~~~~
 mdnsd.c:93:57: note: passing argument to parameter 'host' here
 mdnsd.c:222:5: warning: implicit declaration of function 'free' is invalid
 in C99 [-Wimplicit-function-declaration]struct cached *_c_next(mdnsd d,
 struct cached *c, char *host, int type)
     free(q->name);

     ^                                                        ^

 mdnsd.c:297:17: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(c = _c_next(d,c,r->name,r->type))
               ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:297:17: note: place parentheses around the assignment to silence
 this warning
         while(c = _c_next(d,c,r->name,r->type))
                 ^
               (                               )
 mdnsd.c:297:17: note: use '==' to turn this assignment into an equality
 comparison
         while(c = _c_next(d,c,r->name,r->type))
                 ^
                 ==
 mdnsd.c:308:25: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     c->rr.name = strdup(r->name);
                         ^~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:308:16: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     c->rr.name = strdup(r->name);
                ^ ~~~~~~~~~~~~~~~
 mdnsd.c:229:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     int i = _namehash(r->rr.name) % SPRIME;
                       ^~~~~~~~~~
 mdnsd.c:67:27: note: passing argument to parameter 's' here
 int _namehash(const char *s)
                           ^
 mdnsd.c:322:31: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         c->rr.rdname = strdup(r->known.ns.name);
                               ^~~~~~~~~~~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:322:22: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
         c->rr.rdname = strdup(r->known.ns.name);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:325:31: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         c->rr.rdname = strdup(r->known.srv.name);
                               ^~~~~~~~~~~~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:325:22: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
         c->rr.rdname = strdup(r->known.srv.name);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:333:29: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     if(c->q = _q_next(d, 0, r->name, r->type))
                             ^~~~~~~
 mdnsd.c:84:55: note: passing argument to parameter 'host' here
 struct query *_q_next(mdnsd d, struct query *q, char *host, int type)
                                                       ^
 mdnsd.c:333:13: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
     if(c->q = _q_next(d, 0, r->name, r->type))
        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:333:13: note: place parentheses around the assignment to silence
 this warning
     if(c->q = _q_next(d, 0, r->name, r->type))
             ^
        (                                     )
 mdnsd.cmdnsd.c::249:17: warning333: :passing 'unsigned char *' to
 parameter of type 'char *' converts between pointers to integer types with
 different sign [-Wpointer-sign]
 13: note: use '==' to turn this assignment into an equality comparison
     r->conflict(r->rr.name,r->rr.type,r->arg);
                 ^~~~~~~~~~
     if(c->q = _q_next(d, 0, r->name, r->type))
             ^
             ==
 mdnsd.c:287:23: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     int i = _namehash(r->name) % LPRIME;
                       ^~~~~~~
 mdnsd.c:67:27: note: passing argument to parameter 's' here
 int _namehash(const char *s)
                           ^
 mdnsd.c:291:31: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
                               ^~~~~~~
 mdnsd.c:93:57: note: passing argument to parameter 'host' here
 struct cached *_c_next(mdnsd d, struct cached *c, char *host, int type)
                                                         ^
 mdnsd.c:291:17: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
               ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:291:17: note: place parentheses around the assignment to silence
 this warning
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
                 ^
               (                               )
 mdnsd.c:291:17: note: use '==' to turn this assignment into an equality
 comparison
         while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0;
                 ^
                 ==
 mdnsd.c:297:31: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         while(c = _c_next(d,c,r->name,r->type))
                               ^~~~~~~
 mdnsd.c:93:57: note: passing argument to parameter 'host' here
 struct cached *_c_next(mdnsd d, struct cached *c, char *host, int type)
                                                         ^
 mdnsd.c:297:17: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(c = _c_next(d,c,r->name,r->type))
               ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:297:17: note: place parentheses around the assignment to silence
 this warning
         while(c = _c_next(d,c,r->name,r->type))
                 ^
               (                               )
 mdnsd.c:297:17: note: use '==' to turn this assignment into an equality
 comparison
         while(c = _c_next(d,c,r->name,r->type))
                 ^
                 ==
 mdnsd.c:308:25: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
     c->rr.name = strdup(r->name);
                         ^~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:308:16: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     c->rr.name = strdup(r->name);
                ^ ~~~~~~~~~~~~~~~
 mdnsd.c:322:31: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         c->rr.rdname = strdup(r->known.ns.name);
                               ^~~~~~~~~~~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:322:22: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
         c->rr.rdname = strdup(r->known.ns.name);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:325:31: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         c->rr.rdname = strdup(r->known.srv.name);
                               ^~~~~~~~~~~~~~~~~
 /usr/include/string.h:117:26: note: passing argument to parameter '__s1'
 here
 char    *strdup(const char *__s1);
                             ^
 mdnsd.c:325:22: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
         c->rr.rdname = strdup(r->known.srv.name);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:333:29: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
     if(c->q = _q_next(d, 0, r->name, r->type))
                             ^~~~~~~
 mdnsd.c:84:55: note: passing argument to parameter 'host' here
 struct query *_q_next(mdnsd d, struct query *q, char *host, int type)
                                                       ^
 mdnsd.c:333:13: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
     if(c->q = _q_next(d, 0, r->name, r->type))
        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:333:13: note: place parentheses around the assignment to silence
 this warning
     if(c->q = _q_next(d, 0, r->name, r->type))
             ^
        (                                     )
 mdnsd.c:333:13: note: use '==' to turn this assignment into an equality
 comparison
     if(c->q = _q_next(d, 0, r->name, r->type))
             ^
             ==
 mdnsd.c:423:63: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
             if(m->qd[i].class != d->class || (r =
 _r_next(d,0,m->qd[i].name,m->qd[i].type)) == 0) continue;
 ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:428:42: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
             for(;r != 0; r = _r_next(d,r,m->qd[i].name,m->qd[i].type))
                                          ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:434:69: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                         if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:434:83: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                         if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:441:65: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                     if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:441:79: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                     if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:452:29: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         if((r = _r_next(d,0,m->an[i].name,m->an[i].type)) != 0 &&
 r->unique && _a_match(&m->an[i],&r->rr) == 0) _conflict(d,r);
                             ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:466:13: warning: implicit declaration of function 'htons' is
 invalid in C99 [-Wimplicit-function-declaration]
     *port = htons(5353);
             ^
 mdnsd.c:467:11: warning: implicit declaration of function 'inet_addr' is
 invalid in C99 [-Wimplicit-function-declaration]
     *ip = inet_addr("224.0.0.251");
           ^
 mdnsd.c:423:63: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
             if(m->qd[i].class != d->class || (r =
 _r_next(d,0,m->qd[i].name,m->qd[i].type)) == 0) continue;
 ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:428:42: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
             for(;r != 0; r = _r_next(d,r,m->qd[i].name,m->qd[i].type))
                                          ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:577:30: warning: passing 'char *' to parameter of type 'unsigned
 char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
                 message_qd(m,q->name,q->type,d->class);
                              ^~~~~~~
 ./1035.h:71:51: note: passing argument to parameter 'name' here
 void message_qd(struct message *m, unsigned char *name, unsigned short int
 type, unsigned short int class);
                                                   ^
 mdnsd.c:434:69: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                         if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:434:83: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                         if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
 mdnsd.c                                              ^:
 599:30: warning: passing 'char *' to parameter of type 'unsigned char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
                 message_an(m,q->name,q->type,d->class,c->rr.ttl -
 d->now.tv_sec);
                              ^~~~~~~
 ./1035.h:74:51: note: passing argument to parameter 'name' here
 void message_an(struct message *m, unsigned char *name, unsigned short int
 type, unsigned short int class, unsigned long int ttl);
                                                   ^
 mdnsd.c:441:65: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                     if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 mdnsd.c:441:79: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
                     if(m->qd[i].type != m->an[j].type ||
 strcmp(m->qd[i].name,m->an[j].name)) continue;
 ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 mdnsd.c:452:29: warning: passing 'unsigned char *' to parameter of type
 'char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
         if((r = _r_next(d,0,m->an[i].name,m->an[i].type)) != 0 &&
 r->unique && _a_match(&m->an[i],&r->rr) == 0) _conflict(d,r);
                             ^~~~~~~~~~~~~
 mdnsd.c:102:41: note: passing argument to parameter 'host' here
 mdnsdr _r_next(mdnsd d, mdnsdr r, char *host, int type)
                                         ^
 mdnsd.c:466:13: warning: implicit declaration of function 'htons' is
 invalid in C99 [-Wimplicit-function-declaration]
     *port = htons(5353);
             ^
 mdnsd.c:467:11: warning: implicit declaration of function 'inet_addr' is
 invalid in C99 [-Wimplicit-function-declaration]
     *ip = inet_addr("224.0.0.251");
           ^
 mdnsd.c:577:30: warning: passing 'char *' to parameter of type 'unsigned
 char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
                 message_qd(m,q->name,q->type,d->class);
                              ^~~~~~~
 ./1035.h:71:51: note: passing argument to parameter 'name' here
 void message_qd(struct message *m, unsigned char *name, unsigned short int
 type, unsigned short int class);
                                                   ^
 mdnsd.c:668:19: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(cur = _c_next(d,cur,q->name,q->type))
               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:668:19: note: place parentheses around the assignment to silence
 this warning
         while(cur = _c_next(d,cur,q->name,q->type))
                   ^
               (                                   )
 mdnsd.c:668:19: note: use '==' to turn this assignment into an equality
 comparison
         while(cur = _c_next(d,cur,q->name,q->type))
                   ^
                   ==
 mdnsd.c:599:30: warning: passing 'char *' to parameter of type 'unsigned
 char *' converts between pointers to integer types with different sign
 [-Wpointer-sign]
                 message_an(m,q->name,q->type,d->class,c->rr.ttl -
 d->now.tv_sec);
                              ^~~~~~~
 ./1035.h:74:51: note: passing argument to parameter 'name' here
 void message_an(struct message *m, unsigned char *name, unsigned short int
 type, unsigned short int class, unsigned long int ttl);
                                                   ^
 mdnsd.c:693:16: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     r->rr.name = strdup(host);
                ^ ~~~~~~~~~~~~
 mdnsd.c:743:18: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     r->rr.rdname = strdup(name);
                  ^ ~~~~~~~~~~~~
 mdnsd.c:668:19: warning: using the result of an assignment as a condition
 without parentheses [-Wparentheses]
         while(cur = _c_next(d,cur,q->name,q->type))
               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 mdnsd.c:668:19: note: place parentheses around the assignment to silence
 this warning
         while(cur = _c_next(d,cur,q->name,q->type))
                   ^
               (                                   )
 mdnsd.c:668:19: note: use '==' to turn this assignment into an equality
 comparison
         while(cur = _c_next(d,cur,q->name,q->type))
                   ^
                   ==
 mdnsd.c:693:16: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     r->rr.name = strdup(host);
                ^ ~~~~~~~~~~~~
 mdnsd.c:743:18: warning: assigning to 'unsigned char *' from 'char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
     r->rr.rdname = strdup(name);
                  ^ ~~~~~~~~~~~~
 42 warnings generated.
 42 warnings generated.
 1035.c:89:19: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
 1035.c:89:19: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if(strcmp(*namep,m->_labels[x])) continue;
                   ^~~~~~
 /usr/include/string.h:77        if(strcmp(*namep,m->_labels[x])) continue;
                   ^~~~~~
 :25: note: passing argument to parameter '__s1' here
 /usr/include/string.h:77:25: note: passing argument to parameter '__s1'
 here
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 int      strcmp(const char *__s1, const char *__s2);
                             ^
 1035.c:89:26: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
 1035.c:89:26: warning: passing 'unsigned char *' to parameter of type
 'const char *' converts between pointers to integer types with different
 sign [-Wpointer-sign]
         if(strcmp(*namep,m->_labels[x])) continue;
                          ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note:
 if(strcmp(*namep,m->_labels[x])) continue;passing argument to parameter
 '__s2' here

                          ^~~~~~~~~~~~~
 /usr/include/string.h:77:43: note: passing argument to parameter '__s2'
 here
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 int      strcmp(const char *__s1, const char *__s2);
                                               ^
 1035.c:208:32: warning: assigning to 'char *' from 'unsigned char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]
             rr[i].known.a.name = m->_packet + m->_len;
                                ^ ~~~~~~~~~~~~~~~~~~~~
 1035.c:208:32: warning: assigning to 'char *' from 'unsigned char *'
 converts between pointers to integer types with different sign [-Wpointer-
 sign]1035.c
 :210:13: warning: implicitly declaring library function 'sprintf' with
 type 'int (char *, const char *, ...)' [-Wimplicit-function-declaration]
             rr[i].known.a.name = m->_packet + m->_len;
                                ^ ~~~~~~~~~~~~~~~~~~~~
 sprintf(rr[i].known.a.name,"%d.%d.%d.%d",(*bufp)[0],(*bufp)[1],(*bufp)[2],(*bufp)[3]);
             ^
 1035.c:210:13: 1035.c:210:13:note: include the header <stdio.h> or
 explicitly provide a declaration for 'sprintf'
  warning: implicitly declaring library function 'sprintf' with type 'int
 (char *, const char *, ...)' [-Wimplicit-function-declaration]
 sprintf(rr[i].known.a.name,"%d.%d.%d.%d",(*bufp)[0],(*bufp)[1],(*bufp)[2],(*bufp)[3]);
             ^
 1035.c:210:13: note: include the header <stdio.h> or explicitly provide a
 declaration for 'sprintf'
 1035.c:268:5: error: assignment to cast is illegal, lvalue casts are not
 supported
     my(m->qd, sizeof(struct question) * m->qdcount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note: expanded from macro 'my'
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 1035.c:268:5: error: assignment to cast is illegal, lvalue casts are not
 supported
     my(m->qd, sizeof(struct question) * m->qdcount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note: expanded from macro 'my'
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 1035.c:277:5: error: assignment to cast is illegal, lvalue casts are not
 supported
     my(m->an, sizeof(struct resource) * m->ancount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note: expanded from macro 'my'
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 1035.c:278:5: error: assignment to cast is illegal, lvalue casts are not
 supported
 1035.c    my(m->ns, sizeof(struct resource) * m->nscount);:
 277    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:
 5: error1035.c: :assignment to cast is illegal, lvalue casts are not
 supported244
 :49: note: expanded from macro 'my'
     my(m->an, sizeof(struct resource) * m->ancount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note    #define my(x,y) while(m->_len&7) m->_len++;
 (void*)x = (void*)(m->_packet + m->_len); m->_len += y;:
 expanded from macro 'my'
 ^~~~~~~~ ~

     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 1035.c:279:5: error: assignment to cast is illegal, lvalue casts are not
 supported
 1035.c:278:    my(m->ar, sizeof(struct resource) * m->arcount);5
 :    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 error: assignment to cast is illegal, lvalue casts are not supported
 1035.c:244:49: note: expanded from macro 'my'
     my(m->ns, sizeof(struct resource) * m->nscount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note: expanded from macro 'my'
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 1035.c:279:5: error: assignment to cast is illegal, lvalue casts are not
 supported
     my(m->ar, sizeof(struct resource) * m->arcount);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1035.c:244:49: note: expanded from macro 'my'
     #define my(x,y) while(m->_len&7) m->_len++; (void*)x =
 (void*)(m->_packet + m->_len); m->_len += y;
                                                 ^~~~~~~~ ~
 4 warnings and 4 errors generated.
 4 warnings and 4 errors generated.
 make: *** [mquery] Error 1
 make: *** Waiting for unfinished jobs....
 sdtxt.c:49:32: warning: implicitly declaring library function 'malloc'
 with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
         buf = (unsigned char *)malloc(1);
                                ^
 sdtxt.c:49:32: note: include the header <stdlib.h> or explicitly provide a
 declaration for 'malloc'
 1 warning generated.
 xht.c:43:27: warning: implicitly declaring library function 'strcmp' with
 type 'int (const char *, const char *)' [-Wimplicit-function-declaration]
         if(n->key != 0 && strcmp(key, n->key) == 0)
                           ^
 xht.c:43:27: note: include the header <string.h> or explicitly provide a
 declaration for 'strcmp'
 xht.c:53:17: warning: implicitly declaring library function 'malloc' with
 type 'void *(unsigned long)' [-Wimplicit-function-declaration]
     xnew = (xht)malloc(sizeof(struct xht_struct));
                 ^
 xht.c:53:17: note: include the header <stdlib.h> or explicitly provide a
 declaration for 'malloc'
 xht.c:56:5: warning: implicitly declaring library function 'bzero' with
 type 'void (void *, unsigned long)' [-Wimplicit-function-declaration]
     bzero(xnew->zen,sizeof(struct xhn_struct)*prime);
     ^
 xht.c:56:5: note: include the header <strings.h> or explicitly provide a
 declaration for 'bzero'
 xht.c:86:9: warning: implicit declaration of function 'free' is invalid in
 C99 [-Wimplicit-function-declaration]
         free(n->key);
         ^
 xht.c:93:1: warning: control reaches end of non-void function [-Wreturn-
 type]
 }
 ^
 xht.c:110:5: warning: implicitly declaring library function 'memcpy' with
 type 'void *(void *, const void *, unsigned long)' [-Wimplicit-function-
 declaration]
     memcpy(ckey,key,klen);
     ^
 xht.c:110:5: note: include the header <string.h> or explicitly provide a
 declaration for 'memcpy'
 6 warnings generated.
 make: *** [mhttp] Error 1
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/mdnsd-0.7G'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/work/mdnsd-0.7G"
 && /usr/bin/make -j8 -w all
 Exit code: 2
 Error: Failed to build mdnsd: command execution failed
 DEBUG: Error code: CHILDSTATUS 36856 2
 DEBUG: Backtrace: command execution failed
     while executing
 "system {*}$notty {*}$nice $fullcmdstring"
     invoked from within
 "command_exec build"
     (procedure "portbuild::build_main" line 8)
     invoked from within
 "$procedure $targetname"
 Error: See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_mdnsd/mdnsd/main.log
 for details.
 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
 Error: Processing of port mdnsd failed
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55835>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list