[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 0.24 build failure on macos
From: |
Antonio Diaz Diaz |
Subject: |
Re: 0.24 build failure on macos |
Date: |
Tue, 24 Oct 2023 18:50:07 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
Hi Rui,
Rui Chen wrote:
I am trying to upgrade tarlz to 0.24 for homebrew. But need some build
patch as below for major,minor,makedev on OSX builds
Thank you very much for reporting this.
makedev, major, and minor are annoying because the POSIX pax format requires
them, but POSIX leaves them unspecified. GNU/Linux systems define them in
sys/sysmacros.h[1], while BSD systems define them in sys/types.h[2].
[1] http://manpages.ubuntu.com/manpages/focal/en/man3/minor.3.html
[2] http://man.openbsd.org/minor.3
I have added an #else clause to create.cc, decode.cc, and decode_lz.cc that
I hope fixes the problem:
create.cc:
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__
#include <sys/sysmacros.h> // for major, minor
#else
#include <sys/types.h> // for major, minor
#endif
decode.cc, decode_lz.cc:
#if !defined __FreeBSD__ && !defined __OpenBSD__ && !defined __NetBSD__ && \
!defined __DragonFly__ && !defined __APPLE__ && !defined __OS2__
#include <sys/sysmacros.h> // for major, minor, makedev
#else
#include <sys/types.h> // for major, minor, makedev
#endif
Best regards,
Antonio.