Skip to content

Commit 087ee6d

Browse files
committed
Fix [-Wundef] warning in FileInfo extension
1 parent 67a9c44 commit 087ee6d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/fileinfo/libmagic/file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
#define private static
9292

93-
#if HAVE_VISIBILITY && !defined(WIN32)
93+
#if defined(HAVE_VISIBILITY) && !defined(WIN32)
9494
#define public __attribute__ ((__visibility__("default")))
9595
#ifndef protected
9696
#define protected __attribute__ ((__visibility__("hidden")))

ext/fileinfo/libmagic/funcs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, zend_stat_t *st,
255255
}
256256
#endif
257257

258-
#if PHP_FILEINFO_UNCOMPRESS
258+
#ifdef PHP_FILEINFO_UNCOMPRESS
259259
if ((ms->flags & MAGIC_NO_CHECK_COMPRESS) == 0) {
260260
m = file_zmagic(ms, &b, inname);
261261
if ((ms->flags & MAGIC_DEBUG) != 0)
@@ -367,7 +367,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, zend_stat_t *st,
367367
if (file_printf(ms, "%s", code_mime) == -1)
368368
rv = -1;
369369
}
370-
#if PHP_FILEINFO_UNCOMPRESS
370+
#ifdef PHP_FILEINFO_UNCOMPRESS
371371
done_encoding:
372372
#endif
373373
efree(rbuf);
@@ -434,7 +434,7 @@ file_getbuffer(struct magic_set *ms)
434434
}
435435
ms->o.pbuf = pbuf;
436436

437-
#if defined(HAVE_WCWIDTH)
437+
#ifdef HAVE_WCWIDTH
438438
{
439439
mbstate_t state;
440440
wchar_t nextchar;

0 commit comments

Comments
 (0)