fgetln: Include <stdio.h> after <sys/*> The <sys/*> headers tend to define things that might be used by other headers, so while they should be self-contained, it is better to simply include them first.
diff --git a/src/fgetln.c b/src/fgetln.c
index b3b0a4b..3b62666 100644
--- a/src/fgetln.c
+++ b/src/fgetln.c
@@ -25,10 +25,11 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
+
#include <string.h>
+#include <stdio.h>
#include "local-link.h"