Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Keve committed Nov 10, 2024
1 parent d94a952 commit dc400d7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*.log
*.gz
*.pc
*.dylib
jimsh0
tags
TAGS
Expand Down
4 changes: 4 additions & 0 deletions auto.def
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ if {[pkg-config-init 0]} {
if {[opt-bool with-libcurl]} {
if {![pkg-config libcurl]} {
user-error "Unable to find libcurl"
} else {
define PKG_LIBCURL_CFLAGS [exec pkg-config --static --cflags libcurl ]
define PKG_LIBCURL_LDFLAGS [exec pkg-config --static --libs-only-L libcurl ]
define PKG_LIBCURL_LIBS [exec pkg-config --static --libs-only-l libcurl ]
}
}
if {[opt-bool with-libarchive.pc]} {
Expand Down
1 change: 1 addition & 0 deletions external/libcurl/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SRCS= \
cookie.c \
curl_addrinfo.c \
curl_get_line.c \
curl_memrchr.c \
curl_threads.c \
curl_trc.c \
dynbuf.c \
Expand Down
5 changes: 4 additions & 1 deletion external/libcurl/curl_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,11 @@
/* #undef HAVE_MACH_ABSOLUTE_TIME */

/* Define to 1 if you have the memrchr function or macro. */
#if defined(_DARWIN_C_SOURCE) || defined (__APPLE__)
/* #undef HAVE_MEMRCHR */
#else
#define HAVE_MEMRCHR 1

#endif
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
#define HAVE_MSG_NOSIGNAL 1

Expand Down
2 changes: 1 addition & 1 deletion libpkg/pkg_repo_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ pkg_create_repo_thread(void *arg)
return (NULL);
}

#ifdef __linux__
#if defined (__linux__) || defined(_DARWIN_C_SOURCE) || defined (__APPLE__)
typedef const FTSENT *FTSENTP;
#else
typedef const FTSENT *const FTSENTP;
Expand Down
6 changes: 6 additions & 0 deletions src/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ OTHER_LIBS+= @PKG_OPENSSL_LIBS@
OTHER_LIBS+= -lssl -lcrypto
@endif

@if PKG_LIBCURL_LIBS
LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
LOCAL_LDFLAGS+= @PKG_LIBCURL_LDFLAGS@
OTHER_LIBS+= @PKG_LIBCURL_LIBS@
@endif

@if libmachista
LOCAL_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS) -lresolv
Expand Down

0 comments on commit dc400d7

Please sign in to comment.