1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Define HAVE_VISIBILITY for fileinfo extension (#14618)

The libmagic library also uses the HAVE_VISIBILITY macro that should be
defined to 1 if visibility is supported or 0 if not.

Follow-up of GH-5526 (-Wundef)
This commit is contained in:
Peter Kokot
2024-06-21 16:18:28 +02:00
committed by GitHub
parent b12ccb319f
commit 6e2ad3c4ba
2 changed files with 10 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ if test "$PHP_FILEINFO" != "no"; then
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
])
AX_GCC_FUNC_ATTRIBUTE([visibility])
PHP_NEW_EXTENSION(fileinfo, fileinfo.c php_libmagic.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
PHP_ADD_BUILD_DIR($ext_builddir/libmagic)

View File

@@ -8,3 +8,11 @@
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H 1
#endif
#ifndef HAVE_VISIBILITY
# ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
# define HAVE_VISIBILITY 1
# else
# define HAVE_VISIBILITY 0
# endif
#endif