Skip to content

Commit

Permalink
Fixed redefinition warnings on Linux:
Browse files Browse the repository at this point in the history
IMG_svg.c:52:1: warning: "strchr" redefined
In file included from /usr/include/string.h:637,
                 from /opt/SDL2/include/SDL2/SDL_stdinc.h:60,
                 from /opt/SDL2/include/SDL2/SDL_main.h:25,
                 from /opt/SDL2/include/SDL2/SDL.h:32,
                 from SDL_image.h:27,
                 from IMG_svg.c:26:
/usr/include/bits/string2.h:396:1: warning: this is the location of the previous definition
IMG_svg.c:53:1: warning: "strcmp" redefined
/usr/include/bits/string2.h:800:1: warning: this is the location of the previous definition
IMG_svg.c:54:1: warning: "strncmp" redefined
/usr/include/bits/string2.h:920:1: warning: this is the location of the previous definition
  • Loading branch information
sezero committed Jun 17, 2018
1 parent 238483c commit 7b6f9bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions IMG_svg.c
Expand Up @@ -49,8 +49,11 @@
#define sqrt SDL_sqrt
#define sqrtf SDL_sqrtf
#define sscanf SDL_sscanf
#undef strchr
#define strchr SDL_strchr
#undef strcmp
#define strcmp SDL_strcmp
#undef strncmp
#define strncmp SDL_strncmp
#undef strncpy
#define strncpy SDL_strlcpy
Expand Down

0 comments on commit 7b6f9bc

Please sign in to comment.