From dacf6cfbaa8c66ea6150f95aadad2954f116836c Mon Sep 17 00:00:00 2001
From: Cacodemon345 <[EMAIL REDACTED]>
Date: Thu, 11 Mar 2021 12:03:22 +0600
Subject: [PATCH] Fix compilation with iconv on FreeBSD
---
src/stdlib/SDL_iconv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c
index 9e6ea708a..f360aa2af 100644
--- a/src/stdlib/SDL_iconv.c
+++ b/src/stdlib/SDL_iconv.c
@@ -31,6 +31,10 @@
#include "SDL_endian.h"
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
+#ifdef __FreeBSD__
+/* Define LIBICONV_PLUG to use iconv from the base instead of ports and avoid linker errors. */
+#define LIBICONV_PLUG 1
+#endif
#include <iconv.h>
/* Depending on which standard the iconv() was implemented with,