Skip to content

Fix build error on Mac OS X 10.5.8 Leopard. #3

@jens-gpio

Description

@jens-gpio

Thank you for the great work you're doing. I'd like to add a small contribution...

I do not know if this applies to all versions of Mac OS X (it most likely does), but I've only been able to test on 10.5.8 Leopard, which I use every day.

Here's my suggestion for a patch; it's a simple patch. The endian.h include file is included by other include files already, so there's no need to include machine/endian.h on this system.
(Mac OS X is a FreeBSD variant anyway, so ...)

--- a/sha1.c
+++ b/sha1.c
@@ -92,7 +92,7 @@ A million repetitions of "a"
#include "config.h"
#endif

-#ifndef FreeBSD
+#if !(defined(FreeBSD) || defined(APPLE))
#include <endian.h>
#endif
#include <stdio.h>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions