Ticket #14 (closed defect: released)

Opened 6 years ago

Last modified 5 years ago

pread() on Linux needs #define _XOPEN_SOURCE 500

Reported by: C.vanReeuwijk Owned by: olly
Priority: high Milestone:
Component: Backend-Quartz Version: other
Severity: normal Keywords:
Cc: Blocked By:
Operating System: Linux Blocking:

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

Changed 6 years ago by olly

  • status changed from new to assigned

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

Changed 6 years ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

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

Changed 5 years ago by olly

  • resolution changed from fixed to released

Changed 5 years ago by trac

  • platform set to Linux
Note: See TracTickets for help on using tickets.