Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
libfetch: do not rely on non-portable definitions
Daniel Kolesa committed 3 years ago
commit 562c0e997ba1de24cbbc58beba71baf3959e1fda
parent 1de66b2
6 files changed +6 -7
modified external/libfetch/common.c
@@ -29,7 +29,6 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libfetch/common.c 347050 2019-05-03 06:06:39Z adrian $");

modified external/libfetch/fetch.c
@@ -28,7 +28,6 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libfetch/fetch.c 357212 2020-01-28 18:37:18Z gordon $");

modified external/libfetch/fetch.h
@@ -90,7 +90,9 @@ struct url_ent {
#define	FETCH_URL	18
#define	FETCH_VERBOSE	19

-
__BEGIN_DECLS
+
#ifdef __cplusplus
+
extern "C" {
+
#endif

/* FILE-specific functions */
FILE		*fetchXGetFile(struct url *, struct url_stat *, const char *);
@@ -134,7 +136,9 @@ struct url *fetchParseURL(const char *);
struct url	*fetchDupURL(struct url *);
void		 fetchFreeURL(struct url *);

-
__END_DECLS
+
#ifdef __cplusplus
+
}
+
#endif

/* Connection caching */
void fetchConnectionCacheInit(int, int);
modified external/libfetch/file.c
@@ -28,7 +28,6 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libfetch/file.c 326219 2017-11-26 02:00:33Z pfg $");

modified external/libfetch/ftp.c
@@ -28,7 +28,6 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libfetch/ftp.c 341013 2018-11-27 10:45:14Z des $");

modified external/libfetch/http.c
@@ -28,7 +28,6 @@
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

-
#include <sys/cdefs.h>
#include "bsd_compat.h"
__FBSDID("$FreeBSD: head/lib/libfetch/http.c 351573 2019-08-28 17:01:28Z markj $");