Bug 146752 - rpm-4.4 sqlite.c uses endian.h, which isn't portable
rpm-4.4 sqlite.c uses endian.h, which isn't portable
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-02-01 05:17 EST by Anders F Björklund
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-03 22:48:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch-sqllite.diff (388 bytes, patch)
2005-02-01 05:21 EST, Anders F Björklund
no flags Details | Diff

  None (edit)
Description Anders F Björklund 2005-02-01 05:17:11 EST
Description of problem:
#include <endian.h>

Version-Release number of selected component (if applicable):

How reproducible:
Always, on Darwin and other *BSD too probably.

Steps to Reproduce:
1. Build on BSD
Actual results:
sqlite.c:39:20: endian.h: No such file or directory
sqlite.c: In function `sql_initDB':
sqlite.c:494: error: `__BYTE_ORDER' undeclared (first use in this
sqlite.c:494: error: (Each undeclared identifier is reported only once
sqlite.c:494: error: for each function it appears in.)

Expected results:
(compile OK)

Additional info:
On BSD, the stuff is in <machine/endian.h> and without underscores.
Most likely, these needs to be automangled... (check for endian.h)
Comment 1 Anders F Björklund 2005-02-01 05:21:38 EST
Created attachment 110494 [details]

needs better #ifdef
Comment 2 Jeff Johnson 2005-02-01 12:45:51 EST
Nah, easier to do a runtime test than chase vendor peculiarities.

Will do soonishly, thanks for the report.
Comment 3 Anders F Björklund 2005-02-01 13:20:13 EST
Vendor and vendor.. It's yet another BSD-versus-Linux issue.
(I just used __APPLE__ since I knew that, without a lookup)

But whatever autoconf/automake is easiest to do, would work...
Comment 4 Jeff Johnson 2005-02-03 22:48:04 EST
Runtime test in rpm-4_4 sqlite.c, also rpm-4.4.1-0.13
getmntinfo is used there as well.

Note You need to log in before you can comment on or make changes to this bug.