Quoting P J P (2019-01-13 11:28:03) > +-- On Fri, 11 Jan 2019, Daniel P. Berrangé wrote --+ > | qga/commands.c already includes qemu/osdep.h which includs unistd.h. > | > | The build problem patchew reported was from *mingw* builds where > | sysconf does not exist. > > I see; Not sure how to fix it. Maybe with conditional declaration? > > #ifdef __MINGW[32|64]__ > extern long int sysconf (int __name); > #endif
I would call a helper function like get_args_max() or whatever and have the posix implementation in qga/commands-posix.c and a stub'd version in qga/commands-win32.c. There's an article here that might be useful for figuring out how we would implement get_args_max() it for win32: https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553 > > Thank you. > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F