diff options
| -rw-r--r-- | meta-oe/dynamic-layers/multimedia-layer/recipes-graphics/taisei/taisei/0001-util-consideredharmful-Use-overloadable-func-attribu.patch | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/meta-oe/dynamic-layers/multimedia-layer/recipes-graphics/taisei/taisei/0001-util-consideredharmful-Use-overloadable-func-attribu.patch b/meta-oe/dynamic-layers/multimedia-layer/recipes-graphics/taisei/taisei/0001-util-consideredharmful-Use-overloadable-func-attribu.patch index d1af07416d..09f4be300c 100644 --- a/meta-oe/dynamic-layers/multimedia-layer/recipes-graphics/taisei/taisei/0001-util-consideredharmful-Use-overloadable-func-attribu.patch +++ b/meta-oe/dynamic-layers/multimedia-layer/recipes-graphics/taisei/taisei/0001-util-consideredharmful-Use-overloadable-func-attribu.patch | |||
| @@ -20,21 +20,39 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 20 | src/util/consideredharmful.h | 4 ++-- | 20 | src/util/consideredharmful.h | 4 ++-- |
| 21 | 1 file changed, 2 insertions(+), 2 deletions(-) | 21 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 22 | 22 | ||
| 23 | diff --git a/src/util/consideredharmful.h b/src/util/consideredharmful.h | ||
| 24 | index 3fe1f047..c6771956 100644 | ||
| 25 | --- a/src/util/consideredharmful.h | 23 | --- a/src/util/consideredharmful.h |
| 26 | +++ b/src/util/consideredharmful.h | 24 | +++ b/src/util/consideredharmful.h |
| 27 | @@ -30,11 +30,11 @@ FILE* fopen(); | 25 | @@ -8,6 +8,7 @@ |
| 26 | |||
| 27 | #pragma once | ||
| 28 | #include "taisei.h" | ||
| 29 | +#include "util/compat.h" | ||
| 30 | |||
| 31 | #include <stdio.h> | ||
| 32 | |||
| 33 | @@ -24,17 +25,23 @@ PRAGMA(GCC diagnostic ignored "-Wstrict- | ||
| 34 | // clang generates lots of these warnings with _FORTIFY_SOURCE | ||
| 35 | PRAGMA(GCC diagnostic ignored "-Wignored-attributes") | ||
| 36 | |||
| 37 | +#ifdef __GLIBC__ | ||
| 38 | +#define OVERLOADABLE __attribute__((overloadable)) | ||
| 39 | +#else | ||
| 40 | +#define OVERLOADABLE | ||
| 41 | +#endif | ||
| 42 | + | ||
| 43 | #undef fopen | ||
| 44 | attr_deprecated("Use vfs_open or SDL_RWFromFile instead") | ||
| 45 | FILE* fopen(); | ||
| 28 | 46 | ||
| 29 | #undef strncat | 47 | #undef strncat |
| 30 | attr_deprecated("This function likely doesn't do what you expect, use strlcat") | 48 | attr_deprecated("This function likely doesn't do what you expect, use strlcat") |
| 31 | -char* strncat(); | 49 | -char* strncat(); |
| 32 | +char* __attribute__((overloadable)) strncat(); | 50 | +char* OVERLOADABLE strncat(); |
| 33 | 51 | ||
| 34 | #undef strncpy | 52 | #undef strncpy |
| 35 | attr_deprecated("This function likely doesn't do what you expect, use strlcpy") | 53 | attr_deprecated("This function likely doesn't do what you expect, use strlcpy") |
| 36 | -char* strncpy(); | 54 | -char* strncpy(); |
| 37 | +char* __attribute__((overloadable)) strncpy(); | 55 | +char* OVERLOADABLE strncpy(); |
| 38 | 56 | ||
| 39 | #undef errx | 57 | #undef errx |
| 40 | attr_deprecated("Use log_fatal instead") | 58 | attr_deprecated("Use log_fatal instead") |
