Skip to content

Commit 3fac63a

Browse files
committed
SDL_config.h: Define HAVE_STRLCPY on some platforms.
This makes 1.2 apps compiled with sdl12-compat's headers work with a real SDL 1.2 library on macOS. Otherwise: missing symbol.
1 parent 50bde9f commit 3fac63a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/SDL/SDL_config.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ stage, though. Send patches if your platform lacks something. */
133133
#define HAVE_BCOPY 1
134134
#define HAVE_ATOI 1
135135
#define HAVE_ATOF 1
136-
#define HAVE_STRLCPY 1
137136
#define HAVE_STRLCAT 1
138137
#define HAVE__STRREV 1
139138
#define HAVE__STRUPR 1
@@ -166,6 +165,10 @@ stage, though. Send patches if your platform lacks something. */
166165
#define HAVE_SETJMP 1
167166
#endif
168167

168+
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) /* macos and BSDs have this. */
169+
#define HAVE_STRLCPY 1
170+
#endif
171+
169172
/* Don't define most of the SDL backends, under the assumption checking for these against the headers won't work anyhow.
170173
The exception is the X11 backend; you need its define to know if you can use its syswm interface. */
171174

0 commit comments

Comments
 (0)