1

Im cross compiling haskell to run on Android. After some days of struggling my only remaining problem is that libc on Android (Bionic) is missing some functions found in glibc. More precisely getnetent, setnetent, endnetent, getprotoent, setprotoent, endprotoent, sethostent and endhostent.

As I see it, I have two choices. Either I try to cross compile glibc and link that statically into my program. Some googeling suggests that this might work. A simpler solution might be to write these functions myself. However I am not familiar enough with libc to know if this is even possible? I was also unable to find C code for these functions

prinsen
  • 748
  • 6
  • 16
  • 1
    A third solution is to implement dummy functions that have the same prototype of the missing functions. Clearly they will not work, but it will allow you to compile haskell. If you do not plan to use network-related functionalities in haskell, then it will work. – BrunoLevy Jul 18 '15 at 12:38
  • I am planning to use network related functions, but for others this is a good suggestion – prinsen Jul 18 '15 at 12:54
  • It turned out BrunoLevys suggestion was right! I am able to have the network functionality I need without these functions – prinsen Jul 19 '15 at 09:10

0 Answers0