php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25 `O_RDONLY' undeclared in unified_odbc.c
Submitted: 1998-01-30 23:13 UTC Modified: 1998-01-31 01:28 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: edo at eosys dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0b3 OS: Linux 2.0.33
Private report: No CVE-ID: None
 [1998-01-30 23:13 UTC] edo at eosys dot com
Aloha!

Just a bit of a bug when compiling php-3.0b3 and current CVS tree
with unified-odbc/adabasd support:

functions/unified_odbc.c: In function `php3_uodbc_execute':
functions/unified_odbc.c:671: warning: implicit declaration of function `open'
functions/unified_odbc.c:671: `O_RDONLY' undeclared (first use this function)
functions/unified_odbc.c:671: (Each undeclared identifier is reported only once
functions/unified_odbc.c:671: for each function it appears in.)
make: *** [functions/unified_odbc.o] Error 1

After looking through the source I came up with the patch below.
I really don't see the need for the #else, but I noticed a similar
structure in another file. So, far be it for me to make any radical
changes. Anyway, here's the patch:

diff -uNr php-3.0b3-orig/functions/unified_odbc.c php-3.0b3/functions/unified_odbc.c
--- php-3.0b3-orig/functions/unified_odbc.c     Sat Jan 17 11:54:05 1998
+++ php-3.0b3/functions/unified_odbc.c  Fri Jan 30 17:59:52 1998
@@ -32,6 +32,7 @@
 #ifndef MSVC5
 #include "config.h"
 #include "build-defs.h"
+#include <sys/fcntl.h>
 #else
 #include <fcntl.h>
 #endif


-later, edo

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-01-31 01:28 UTC] rasmus
Fixes
 [2020-01-27 08:51 UTC] nikic@php.net
Automatic comment from SVN on behalf of nikic
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349035
Log: Fixed an incorrect return value

Patch by mmcev106.

Closes php/doc-en#25.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC