[ python-Bugs-1701192 ] symbol conflict for 'readahead'

SourceForge.net noreply at sourceforge.net
Mon Apr 16 02:02:34 CEST 2007


Bugs item #1701192, was opened at 2007-04-15 20:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1701192&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: ajrh (ajrh)
Assigned to: Nobody/Anonymous (nobody)
Summary: symbol conflict for 'readahead'

Initial Comment:
I'm encountering the error below with python 2.5 on current Debian x86. 

src/python-2.5.1c1/Objects/fileobject.c:1845: error: conflicting types for 'readahead'
/usr/include/bits/fcntl.h:187: error: previous declaration of 'readahead' was here

It may be that's it's provoked only by my slightly custom embedded build process - perhaps the standard build does not include fcntl.h while compiling this file.

A fix is trivial - just to rename the static readahead function to something else, e.g. as below.

Rgds

A

====================================



--- fileobject.c.Orig   2007-04-15 19:47:35.000000000 -0400
+++ fileobject.c        2007-04-15 19:49:11.000000000 -0400
@@ -1841,7 +1841,7 @@
    (unless at EOF) and no more than bufsize.  Returns negative value on
    error, will set MemoryError if bufsize bytes cannot be allocated. */
 static int
-readahead(PyFileObject *f, int bufsize)
+do_readahead(PyFileObject *f, int bufsize)
 {
        Py_ssize_t chunksize;

@@ -1887,7 +1887,7 @@
        Py_ssize_t len;

        if (f->f_buf == NULL)
-               if (readahead(f, bufsize) < 0)
+               if (do_readahead(f, bufsize) < 0)
                        return NULL;

 

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1701192&group_id=5470


More information about the Python-bugs-list mailing list