I have used homebrew to get gnucobol working on the M series macs.
Changes to socket samples.
I should mention that I use gnucobol from "brew" and the default C compiler to build my toolchain.
Can confirm it works on M1.
The example from https://gnucobol.sourceforge.io/faq/index.html "4.1.245 FUNCTION-ID" I for some reason thought I had seen it elsewhere too.
I was able to get my example code working, with the changes you suggested.
I'd like to know if the current example in the gnucobol programmers guide works works for anyone else, as its not working for me at the moment.
I now have the trivial example working, I had to explicitly call out that the parameter being passed was 'by value'. From: procedure division USING VAL_FROM_C. To: procedure division USING BY VALUE VAL_FROM_C. Same tests on libcurl/more complex version did not yield results, but I will continue to investigate.