Skip to content

Commit

Permalink
Makefile: Fix compilation from OTP-23 onwards
Browse files Browse the repository at this point in the history
It has been tested against OTP-24 and OTP-26, and in both cases it fixes
the compilation error.

* https://www.erlang.org/news/140:
"erl_interface: Removed the deprecated parts of erl_interface
(erl_interface.h and essentially all C functions with prefix erl_)."

* https://elixirforum.com/t/where-is-liberl-interface-a-in-otp-23/35406
  • Loading branch information
pespin committed Oct 31, 2023
1 parent 195a427 commit 995ff3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions c_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ clean:

../priv/lib/gen_socket_nif.so: gen_socket_nif.o
(test -d ../priv/lib || mkdir -p ../priv/lib)
$(CC) $(CFLAGS) $(LDFLAGS) gen_socket_nif.o -o ../priv/lib/gen_socket_nif.so -shared -lei -lerl_interface
$(CC) $(CFLAGS) $(LDFLAGS) gen_socket_nif.o -o ../priv/lib/gen_socket_nif.so -shared -lei
#-lerl_interface

../priv/lib/gen_socket.so: gen_socket_drv.o
(test -d ../priv/lib || mkdir -p ../priv/lib)
$(CC) $(CFLAGS) $(LDFLAGS) gen_socket_drv.o -o ../priv/lib/gen_socket.so -shared -lei -lerl_interface
$(CC) $(CFLAGS) $(LDFLAGS) gen_socket_drv.o -o ../priv/lib/gen_socket.so -shared -lei
#-lerl_interface

0 comments on commit 995ff3c

Please sign in to comment.