I did a patch file with
diff -Naur src/bacula.h src/bacula.h.old
and give me a file like this
--- src/bacula.h 2015-08-13 15:52:24 +0200
+++ src/bacula.h 2015-10-05 19:21:09 +0200
@@ -72,7 +72,7 @@
#endif
#if HAVE_UNISTD_H
# ifdef HAVE_HPUX_OS
-# undef _INCLUDE_POSIX1C_SOURCE
+/*# undef _INCLUDE_POSIX1C_SOURCE*/
# endif
#include <unistd.h>
#endif
@@ -95,6 +95,7 @@
#if defined(_MSC_VER)
extern "C" {
#include "getopt.h"
+#include "fcntl.h"
}
#endif
When i use to patch it ask me
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- src/bacula.h 2015-08-13 15:52:24 +0200
|+++ src/bacula.h 2015-10-05 19:21:09 +0200
I want automatically patch src/bacula.h without ask how to do? I use
patch -p1 < file.patch
file.hfirst,file.h.oldsecond, are you sure you want differences going fromfile.htofile.h.old? and not the other way around? 2. secondly any reason for the inconsistency file.h whereas the output you have has no mention of file.h , it keeps talking about src/bacula.h