Loading...
--- Libc/Libc-763.13/stdio/FreeBSD/fgets.c
+++ Libc/Libc-1669.40.2/stdio/FreeBSD/fgets.c
@@ -42,6 +42,7 @@
#include "un-namespace.h"
#include "local.h"
#include "libc_private.h"
+#include "libc_hooks_impl.h"
/*
* Read at most n-1 characters from the given file.
@@ -49,10 +50,7 @@
* Return first argument, or NULL if no characters were read.
*/
char *
-fgets(buf, n, fp)
- char *buf;
- int n;
- FILE *fp;
+fgets(char *buf, int n, FILE *fp)
{
size_t len;
char *s;
@@ -60,6 +58,9 @@
if (n <= 0) /* sanity check */
return (NULL);
+
+ libc_hooks_will_write(buf, n);
+ libc_hooks_will_write(fp, sizeof(*fp));
FLOCKFILE(fp);
ORIENT(fp, -1);