Skip to content
  • Richard W.M. Jones's avatar
    ones: Rename global 'byte' to avoid conflict on mingw · b5d79552
    Richard W.M. Jones authored
    ones.c:49:16: error: 'byte' redeclared as different kind of symbol
       49 | static uint8_t byte = 0xff;
          |                ^~~~
    In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/wtypes.h:8,
                     from /usr/i686-w64-mingw32/sys-root/mingw/include/winscard.h:10,
                     from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:97,
                     from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
                     from /usr/i686-w64-mingw32/sys-root/mingw/include/ws2tcpip.h:17,
                     from ../../include/nbdkit-common.h:48,
                     from ../../include/nbdkit-plugin.h:38,
                     from ones.c:43:
    /usr/i686-w64-mingw32/sys-root/mingw/include/rpcndr.h:63:25: note: previous declaration of 'byte' with type 'byte' {aka 'unsigned char'}
       63 |   typedef unsigned char byte;
          |                         ^~~~
    
    Fixes: commit 1b13f803
    b5d79552