Bug 146752

Summary: rpm-4.4 sqlite.c uses endian.h, which isn't portable
Product: [Fedora] Fedora Reporter: Anders F Björklund <afb>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-04 03:48:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch-sqllite.diff none

Description Anders F Björklund 2005-02-01 10:17:11 UTC
Description of problem:
#include <endian.h>

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

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

Steps to Reproduce:
1. Build on BSD
2.
3.
  
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
function)
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 10:21:38 UTC
Created attachment 110494 [details]
patch-sqllite.diff

needs better #ifdef

Comment 2 Jeff Johnson 2005-02-01 17:45:51 UTC
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 18:20:13 UTC
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-04 03:48:04 UTC
Runtime test in rpm-4_4 sqlite.c, also rpm-4.4.1-0.13
    ftp://jbj.org/pub/rpm-macosx
getmntinfo is used there as well.