thanks Rich
until I discovered the glibc issue, my compile was failing and my above line did succeed but happy to add a new line.
Looking at your command, and matching pattern, I think I found an easier command (easier for me at my coding level)
sed -i '1aline2' /pathway2/file.c
Which translates as find line number 1....insert a new line, after line specified, with a new line that has contents "line 2" into a certain file
its shorter and only needs a text editor with line numbers or someone who can count