aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/Makefile1
-rw-r--r--iconv/skeleton.c24
2 files changed, 20 insertions, 5 deletions
diff --git a/iconv/Makefile b/iconv/Makefile
index cd486b737e..8b4f605e5b 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -31,6 +31,7 @@ ifeq ($(elf),yes)
routines += gconv_dl
else
CFLAGS-gconv_db.c = -DSTATIC_GCONV
+CFLAGS-gconv_simple.c = -DSTATIC_GCONV
endif
distribute = gconv_builtin.h gconv_int.h loop.c skeleton.c
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index 90203213ef..bae82be3ed 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -77,13 +77,16 @@
*/
#include <assert.h>
-#include <dlfcn.h>
#include <gconv.h>
#include <string.h>
#define __need_size_t
#define __need_NULL
#include <stddef.h>
-#include <elf/ldsodefs.h>
+
+#ifndef STATIC_GCONV
+# include <dlfcn.h>
+# include <elf/ldsodefs.h>
+#endif
/* The direction objects. */
@@ -219,9 +222,15 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
if (status == GCONV_OK)
#endif
- /* Give the modules below the same chance. */
- status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL,
- written, 1));
+ {
+ /* Give the modules below the same chance. */
+#ifdef DL_CALL_FCT
+ status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL,
+ written, 1));
+#else
+ status = (*fct) (next_step, next_data, NULL, NULL, written, 1);
+#endif
+ }
}
}
else
@@ -287,8 +296,13 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data,
const char *outerr = data->outbuf;
int result;
+#ifdef DL_CALL_FCT
result = DL_CALL_FCT (fct, (next_step, next_data, &outerr,
outbuf, written, 0));
+#else
+ result = (*fct) (next_step, next_data, &outerr, outbuf,
+ written, 0);
+#endif
if (result != GCONV_EMPTY_INPUT)
{