Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#14 closed defect (released)

pread() on Linux needs #define _XOPEN_SOURCE 500

Reported by: Kees van Reeuwijk Owned by: Olly Betts
Priority: high Milestone:
Component: Backend-Quartz Version: other
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description

Hi,

Compiling xapian-core-0.7.1 on a current Debian testing system causes a compile-time error on the file `backends/quartz/btree.cc', because pread() is unknown. Consulting the man page of pread() on my system shows:

SYNOPSIS

#define _XOPEN_SOURCE 500 #include <unistd.h>

Adding the #define solves the problem.

I wonder why configure set HAVE_PREAD, but that's secondary.

Change History (3)

comment:1 by Olly Betts, 21 years ago

Status: newassigned

configure finds pread because it just checks if it can link to a function when supplying its own prototype.

comment:2 by Olly Betts, 21 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in CVS, and so in 0.7.2 when it's released.

comment:3 by Olly Betts, 21 years ago

Operating System: Linux
Resolution: fixedreleased
Note: See TracTickets for help on using tickets.