wolfetplayer / RealRTCW

RealRTCW mod based on ioRTCW engine
https://store.steampowered.com/app/1379630/RealRTCW/
GNU General Public License v3.0
113 stars 28 forks source link

mac os m1 build failure (Werror implicit declaration of function 'va_arg' is invalid in C99) #89

Closed Kokokokoka closed 3 months ago

Kokokokoka commented 2 years ago

Building latest master raises the following errors:

code/steamshim/steamshim_child.c:39:5: error: implicitly declaring library function 'va_start' with type 'void (__builtin_va_list &, ...)' [-Werror,-Wimplicit-function-declaration]
    va_start(args, fmt);
    ^
code/steamshim/steamshim_child.c:39:5: note: include the header <stdarg.h> or explicitly provide a declaration for 'va_start'
code/steamshim/steamshim_child.c:58:34: error: implicit declaration of function 'va_arg' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                fprintf(f, "%i", va_arg(args, int));
                                 ^
code/steamshim/steamshim_child.c:58:47: error: expected expression
                fprintf(f, "%i", va_arg(args, int));
                                              ^
code/steamshim/steamshim_child.c:61:47: error: expected expression
                fprintf(f, "%i", va_arg(args, unsigned int));
                                              ^
code/steamshim/steamshim_child.c:64:47: error: expected expression
                fprintf(f, "%c", va_arg(args, char));
                                              ^
code/steamshim/steamshim_child.c:67:47: error: expected expression
                fprintf(f, "%f", va_arg(args, float));
                                              ^
code/steamshim/steamshim_child.c:70:47: error: expected expression
                fprintf(f, "%s", va_arg(args, const char *));
                                              ^
code/steamshim/steamshim_child.c:79:5: error: implicitly declaring library function 'va_end' with type 'void (__builtin_va_list &)' [-Werror,-Wimplicit-function-declaration]
    va_end(args);
    ^
code/steamshim/steamshim_child.c:79:5: note: include the header <stdarg.h> or explicitly provide a declaration for 'va_end'

steps to reproduce

  1. chmod +x ./make-macosx.sh
  2. ./make-macosx.sh arm64
  3. build errors
jmshgs commented 3 months ago

has this been fixed?

wolfetplayer commented 3 months ago

should be good on 5.0 version, which will be released soon. If not - reopen.

jmshgs commented 3 months ago

great thanks!