Fixed compile error on FreeBSD 9. #1945

pull centromere wants to merge 1 commits into bitcoin:master from centromere:leveldb_fix changing 1 files +9 −2
  1. centromere commented at 5:51 AM on October 22, 2012: none
  2. Fixed compile error on FreeBSD 9.
    See http://code.google.com/p/leveldb/issues/detail?id=98
    17bfb1f437
  3. robbak commented at 6:43 AM on October 22, 2012: contributor

    I have the same issue patched in my preliminary port directory. I have used the solution chosen by the author of the databases/leveldb port:

    --- port/port_posix.h.orig  2012-05-31 00:56:59.000000000 +0800
    +++ src/leveldb/port/port_posix.h   2012-06-15 15:07:41.274868153 +0800
    @@ -25,6 +25,11 @@
       defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
       #include <sys/types.h>
       #include <sys/endian.h>
     +  #ifdef _LITTLE_ENDIAN
     +    #define PLATFORM_IS_LITTLE_ENDIAN true
     +  #else
     +    #define PLATFORM_IS_LITTLE_ENDIAN false 
     +  #endif
     #else
          #include <endian.h>
      #endif
    

    On a similar matter, have you had a look at the bitcoin FreeBSD port? I'd like to get some input from the bitcoin community. There are bound to be some "but we do it this way" issues to compromise on, of course, but all comments are welcome.

    http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-p2p/bitcoin/

  4. centromere commented at 6:54 AM on October 22, 2012: none

    All I did was replace the port_posix.h file in bitcoin with the one from the latest commit of leveldb. It seems to me like the cleanest option.

  5. luke-jr commented at 6:57 AM on October 22, 2012: member

    Note the bitcoin codebase doesn't work in big endian at all right now. Also note that despite many headers/software making the assumption that endian is fixed at build time, that assumption is apparently not necessarily true in theory.

    The cleanest option is to use a git submodule to embed LevelDB, at least until it's possible to build/link with system LevelDB.

  6. sipa commented at 7:08 AM on October 22, 2012: member

    Well, if anything, upgrading to a newer upstream version of the the port_posix.h file is no problem in my opinion, certainly if it fixes building for some people.

  7. sipa commented at 6:31 PM on October 22, 2012: member

    ACK

  8. BitcoinPullTester commented at 5:16 PM on October 30, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/17bfb1f4378445aaf5b3c3afdd47e289e22c0545 for binaries and test log.

  9. sipa commented at 8:57 PM on October 30, 2012: member

    Alternatively, we could try updating to LevelDB 1.6 entirely?

  10. Diapolo commented at 9:07 PM on October 30, 2012: none

    @sipa Is there a changelog fot that available? IMHO as long as there is no stable release available, we are free to do this whenever it's needed / wanted :).

  11. jgarzik referenced this in commit 848c0d5d95 on Nov 16, 2012
  12. jgarzik merged this on Nov 16, 2012
  13. jgarzik closed this on Nov 16, 2012

  14. laudney referenced this in commit bbd5ac5a53 on Mar 19, 2014
  15. KolbyML referenced this in commit d98378e56b on Dec 5, 2020
  16. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me