#45636 [Opn->Fbk]: fileinfo ext duplicate strndup

From: Date: Sun, 27 Jul 2008 09:13:46 +0000
Subject: #45636 [Opn->Fbk]: fileinfo ext duplicate strndup
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127305@lists.php.net to get a copy of this message
 ID:               45636
 Updated by:       jani@php.net
 Reported By:      Fedora at FamilleCollet dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: Linux (Fedora 9)
 PHP Version:      5.3CVS-2008-07-27 (snap)
 New Comment:

Compiles fine for me in Linux. What was the full configure line you
used?


Previous Comments:
------------------------------------------------------------------------

[2008-07-27 07:14:07] Fedora at FamilleCollet dot com

Description:
------------
Fileinfo extention is now enabled by default but doesn't compile
because it use "strndup" with is provided both by the system and the
source (softmagic.c)

Source code of softmagic.c contain a test arround is local defined
fonction :

#ifndef HAVE_STRNDUP
char * strndup(const char *, size_t);

...
#endif

But nothing set this macro.
I don't find anything in the .m4 files

Perhaps it should better use the zend_strndup ?

Reproduce code:
---------------
make


Expected result:
----------------
Build succed

Actual result:
--------------
/home/rpmbuild/BUILD/php5.3-200807270630/ext/fileinfo/libmagic/softmagic.c:305:
error: expected identifier or '(' before '__extension__'
/home/rpmbuild/BUILD/php5.3-200807270630/ext/fileinfo/libmagic/softmagic.c:308:
error: expected identifier or '(' before '__extension__'
make: *** [ext/fileinfo/libmagic/softmagic.lo] Error 1



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45636&edit=1



Thread (10 messages)

« previous php.bugs (#127305) next »