Skip to content

Commit 3322581

Browse files
author
Derick Rethans
committed
- Only include ftok() if it is available
1 parent c5a73b3 commit 3322581

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ext/standard/basic_functions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,9 @@ function_entry basic_functions[] = {
832832
PHP_FE(version_compare, NULL)
833833

834834
/* functions from ftok.c*/
835+
#if HAVE_FTOK
835836
PHP_FE(ftok, NULL)
837+
#endif
836838

837839
PHP_FE(str_rot13, NULL)
838840

ext/standard/ftok.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <sys/types.h>
2424
#include <sys/ipc.h>
2525

26+
#if HAVE_FTOK
2627
/* {{{ proto int ftok(string pathname, string proj)
2728
Convert a pathname and a project identifier to a System V IPC key */
2829
PHP_FUNCTION(ftok)
@@ -53,6 +54,7 @@ PHP_FUNCTION(ftok)
5354
RETURN_LONG(k);
5455
}
5556
/* }}} */
57+
#endif
5658

5759
/*
5860
* Local variables:

ext/standard/php_ftok.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#ifndef PHP_FTOK_H
2222
#define PHP_FTOK_H
2323

24+
#if HAVE_FTOK
2425
PHP_FUNCTION(ftok);
26+
#endif
2527

2628
#endif /* PHP_FTOK_H */

0 commit comments

Comments
 (0)