On 2020/03/29 04:10, Solene Rapenne wrote:
> CVSROOT:      /cvs
> Module name:  ports
> Changes by:   [email protected]  2020/03/29 04:10:29
> 
> Modified files:
>       emulators/mednafen: Makefile distinfo 
>       emulators/mednafen/patches: patch-src_sexyal_sexyal_cpp 
> Added files:
>       emulators/mednafen/patches: patch-src_snes_src_lib_libco_amd64_c 
>                                   patch-src_snes_src_lib_libco_x86_c 
> 
> Log message:
> Update to mednafen-1.24.1
> 
> ok jeremy@
> 
> update include libco patches to repair snes module which was crashing
> clues from bentley@ for importing patches from emulators/higan
> 

Broken on i386, this file needs at least sys/mman.h and unistd.h:

cc -std=gnu99 -fsigned-char -DHAVE_CONFIG_H -I/usr/local/include  -I../include 
-I../include -I../intl  -DNOMINMAX -I./snes/src/lib -I/usr/local/include 
-fno-fast-math -fno-unsafe-math-optimizations -fomit-frame-pointer 
-fstrict-aliasing  -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla 
-Wvariadic-macros -Wdisabled-optimization -Werror=write-strings  -fno-pic 
-fno-pie -fno-PIC -fno-PIE -fwrapv -fjump-tables -mno-retpoline   -Wno-unused 
-Wno-shadow -Wno-sign-compare -Wno-uninitialized -Wno-parentheses -Wno-switch 
-I/usr/local/include -I/usr/local/include/SDL2 -MT 
snes/src/lib/libco/libsnes_a-libco.o -MD -MP -MF 
snes/src/lib/libco/.deps/libsnes_a-libco.Tpo -c -o 
snes/src/lib/libco/libsnes_a-libco.o `test -f 'snes/src/lib/libco/libco.c' || 
echo './'`snes/src/lib/libco/libco.c
In file included from snes/src/lib/libco/libco.c:12:
snes/src/lib/libco/x86.c:70:14: warning: implicit declaration of function 
'sysconf' is invalid in C99 [-Wimplicit-function-declaration]
  pagesize = sysconf(_SC_PAGESIZE);
             ^
snes/src/lib/libco/x86.c:70:22: error: use of undeclared identifier 
'_SC_PAGESIZE'
  pagesize = sysconf(_SC_PAGESIZE);
                     ^
snes/src/lib/libco/x86.c:79:24: warning: implicit declaration of function 
'mmap' is invalid in C99 [-Wimplicit-function-declaration]
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                       ^
snes/src/lib/libco/x86.c:79:46: error: use of undeclared identifier 'PROT_READ'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                             ^
snes/src/lib/libco/x86.c:79:56: error: use of undeclared identifier 'PROT_WRITE'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                                       ^
snes/src/lib/libco/x86.c:79:68: error: use of undeclared identifier 'MAP_FIXED'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                                                   ^
snes/src/lib/libco/x86.c:79:78: error: use of undeclared identifier 'MAP_STACK'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                                                             ^
snes/src/lib/libco/x86.c:79:88: error: use of undeclared identifier 
'MAP_PRIVATE'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                                                                
       ^
snes/src/lib/libco/x86.c:79:100: error: use of undeclared identifier 'MAP_ANON'
  handle = (cothread_t)mmap(handle, newsize, PROT_READ|PROT_WRITE, 
MAP_FIXED|MAP_STACK|MAP_PRIVATE|MAP_ANON, -1, 0);
                                                                                
                   ^
snes/src/lib/libco/x86.c:80:16: error: use of undeclared identifier 'MAP_FAILED'
  if(handle == MAP_FAILED)
               ^
2 warnings and 8 errors generated.

Reply via email to