Cannot find _setvbuf_ with gfortran on High Sierra [on hold]

I am trying to build some fortran code on a High Sierra machine. I have tried using gfortran under fink, and gfortran under brew, and in both cases I get an error of the following type (using brew gfortran):

gfortran -fopenmp -O lte.o lte_sub.o set_lte_est.o det_ed.o \ lte_pop_sl.o ltepop_wld_v1.o genopaeta_v8.o set_line_opac.o \ writedc_v2.o -L/Users/ewinter/tmp/cur_cmf/lib/ -lmod -ldev -lnewsubs \ -lsubs -lpgplt -ltools -lmod -L/usr/local/lib -L/usr/lib -llapack \ -lblas -o /Users/ewinter/tmp/cur_cmf/exe/main_lte.exe Undefined symbols for architecture x86_64: "_setvbuf_", referenced from: _set_line_buffering_ in libsubs.a(set_line_buffering.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[1]: *** [/Users/ewinter/tmp/cur_cmf/exe/main_lte.exe] Error 1 make: *** [d_lte] Error 2}

I know that setvbuf() is a standard function, and should be in libc. But I can’t find it anywhere. I am using gcc 8.2.0.

Does anyone have an idea of how I can tweak the link line to find setvbuf()?

Thanks Eric