Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Additional OS X portability fixes.
Landon Fuller committed 11 years ago
commit 5ec96d9a84d7860b7b8cb7b95c69a951e9b171cc
parent a6e9e26
3 files changed +18 -2
modified src/Makefile.am
@@ -51,6 +51,7 @@ pkg_CFLAGS= -I$(top_srcdir)/libpkg \
			-Werror
pkg_static_SOURCES=
pkg_static_LDADD= $(top_builddir)/libpkg/libpkg_static.la \
+
			$(top_builddir)/compat/libbsd_compat.la \
			$(top_builddir)/external/libsbuf_static.la \
			$(pkg_OBJECTS) \
			@LIBJAIL_LIB@ \
@@ -64,7 +65,6 @@ pkg_static_LDADD= $(top_builddir)/libpkg/libpkg_static.la \
			-llzma \
			-lssl \
			-lcrypto \
-
			-lmd \
			-lm
if LIBELF_BUNDLED
pkg_static_LDADD+=	$(top_builddir)/external/libelf_static.la
modified src/stats.c
@@ -25,16 +25,24 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

+
#ifdef HAVE_CONFIG_H
+
#include "pkg_config.h"
+
#endif
+

#include <err.h>
#include <getopt.h>
#include <inttypes.h>
+
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
+
#endif
#include <stdio.h>
#include <sysexits.h>
#include <unistd.h>

#include <pkg.h>

+
#include <bsd_compat.h>
+

#include "pkgcli.h"

void
modified src/utils.c
@@ -28,13 +28,19 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

+
#ifdef HAVE_CONFIG_H
+
#include "pkg_config.h"
+
#endif
+

#include <sys/param.h>
#include <sys/stat.h>

#include <err.h>
#include <fcntl.h>
#include <inttypes.h>
+
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
+
#endif
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
@@ -44,6 +50,8 @@
#include <errno.h>
#include <pkg.h>

+
#include <bsd_compat.h>
+

#include "utlist.h"
#include "pkgcli.h"

@@ -56,7 +64,7 @@ query_tty_yesno(bool r, const char *msg, ...)
	FILE	*tty;
	int	 tty_flags = O_RDWR;

-
#ifndef __DragonFly__
+
#if !defined(__DragonFly__) && !defined(__APPLE__)
	tty_flags |= O_TTY_INIT;
#endif
	tty_fd = open(_PATH_TTY, tty_flags);