Skip to content

Commit 5e1825a

Browse files
committed
Fix [-Wundef] in FileInfo extension
1 parent ffc6072 commit 5e1825a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/fileinfo/libmagic/file.h

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

101101
#define private static
102102

103-
#if HAVE_VISIBILITY && !defined(WIN32)
103+
#if defined(HAVE_VISIBILITY) && !defined(WIN32)
104104
#define public __attribute__ ((__visibility__("default")))
105105
#ifndef protected
106106
#define protected __attribute__ ((__visibility__("hidden")))

ext/fileinfo/libmagic/funcs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, zend_stat_t *st,
333333
}
334334
#endif
335335

336-
#if PHP_FILEINFO_UNCOMPRESS
336+
#ifdef PHP_FILEINFO_UNCOMPRESS
337337
/* try compression stuff */
338338
if ((ms->flags & MAGIC_NO_CHECK_COMPRESS) == 0) {
339339
m = file_zmagic(ms, &b, inname);
@@ -457,7 +457,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, zend_stat_t *st,
457457
if (file_printf(ms, "%s", code_mime) == -1)
458458
rv = -1;
459459
}
460-
#if PHP_FILEINFO_UNCOMPRESS
460+
#ifdef PHP_FILEINFO_UNCOMPRESS
461461
done_encoding:
462462
#endif
463463
efree(rbuf);

0 commit comments

Comments
 (0)