chiark / gitweb /
zsh: Work on binary loadable modules
[termux-packages] / packages / zsh / src-module.c.patch
1 diff -u -r ../zsh-5.1.1/Src/module.c ./Src/module.c
2 --- ../zsh-5.1.1/Src/module.c   2015-02-19 14:47:41.000000000 -0500
3 +++ ./Src/module.c      2015-11-24 18:38:12.383460402 -0500
4 @@ -1496,8 +1496,10 @@
5  #else
6  # ifdef HAVE_DL_H
7  #  include <dl.h>
8 -#  define RTLD_LAZY BIND_DEFERRED
9 -#  define RTLD_GLOBAL DYNAMIC_PATH
10 +#  ifndef __ANDROID__
11 +#   define RTLD_LAZY BIND_DEFERRED
12 +#   define RTLD_GLOBAL DYNAMIC_PATH
13 +#  endif
14  # else
15  #  include <sys/types.h>
16  #  include <nlist.h>
17 @@ -1550,11 +1552,14 @@
18  /**/
19  #endif /* !AIXDYNAMIC */
20  
21 -#ifndef RTLD_LAZY
22 -# define RTLD_LAZY 1
23 -#endif
24 -#ifndef RTLD_GLOBAL
25 -# define RTLD_GLOBAL 0
26 +#ifndef __ANDROID__
27 +/* On Android RTLD_LAZY and RTLD_LAZY are enum values so cannot ifdef check. */
28 +# ifndef RTLD_LAZY
29 +#  define RTLD_LAZY 1
30 +# endif
31 +# ifndef RTLD_GLOBAL
32 +#  define RTLD_GLOBAL 0
33 +# endif
34  #endif
35  
36  /*