[PD-dev] compiler oopses compiling s_net.c on windoze

Dan Wilcox danomatika at gmail.com
Thu May 28 13:00:16 CEST 2020


Howdy Miller,

It seems those flags are defined in different headers depending on the Windows version:

https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter <https://docs.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo#use-of-ai-flags-in-the-phints-parameter>

I think we just need PP a version check and relevant include at the top of s_net.c and/or s_net.h. Most people testing were using Windows 7+ which is probably why we didn't see this issue before.

> On May 28, 2020, at 12:00 PM, pd-dev-request at lists.iem.at wrote:
> 
> Message: 2
> Date: Wed, 27 May 2020 22:14:44 -0700
> From: Miller Puckette <msp at ucsd.edu <mailto:msp at ucsd.edu>>
> To: pd-dev at iem.at <mailto:pd-dev at iem.at>
> Subject: [PD-dev] compiler oopses compiling s_net.c on windoze
> Message-ID: <20200528051444.GD18346 at ucsd.edu <mailto:20200528051444.GD18346 at ucsd.edu>>
> Content-Type: text/plain; charset=us-ascii
> 
> Compiling on Windows using mingw32 I get this:
> 
> x86_64-w64-mingw32-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" -DPACKAGE_VERSION=\"0.51.0\" -DPACKAGE_STRING=\"pd\ 0.51.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" -DVERSION=\"0.51.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -Dvfork=fork -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_FLOOR=1 -DHAVE_GETCWD=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_POW=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -I.  -I../portaudio/portaudio/include -I../portmidi/portmidi/pm_common -I../portmidi/portmidi/porttime -DWISH=\"wish86.exe\"  -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer -O3 -MT pdsend-s_net.o -MD -MP -MF .deps/pdsend-s_net.Tpo -c -o pdsend-s_net.o `test -f 's_net.c' || echo './'`s_net.c
> s_net.c: In function 'addrinfo_get_list':
> s_net.c:55:22: error: 'AI_ALL' undeclared (first use in this function); did you mean 'SIF_ALL'?
>     hints.ai_flags = AI_ALL |       /* both IPv4 and IPv6 addrs */
>                      ^~~~~~
>                      SIF_ALL
> s_net.c:55:22: note: each undeclared identifier is reported only once for each function it appears in
> s_net.c:56:22: error: 'AI_V4MAPPED' undeclared (first use in this function); did you mean 'MIDI_MAPPER'?
>                      AI_V4MAPPED |  /* fallback to IPv4-mapped IPv6 addrs */
>                      ^~~~~~~~~~~
>                      MIDI_MAPPER
> make[2]: *** [Makefile:2318: pdsend-s_net.o] Error 1
> 
> 
> I'l try to fix this Thursday but if anyone who understands the new networking
> code gets there before I do you might do a better job than I can...
> 
> thanks
> Miller

--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20200528/3279b189/attachment-0001.html>


More information about the Pd-dev mailing list