summaryrefslogtreecommitdiff
path: root/system/partimage/compilefix.diff
blob: 97871ca870904339fc05836b2c88051dd7aae56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
diff -Naur partimage-0.6.9/configure.ac partimage-0.6.9.patched/configure.ac
--- partimage-0.6.9/configure.ac	2010-07-25 11:30:52.000000000 -0400
+++ partimage-0.6.9.patched/configure.ac	2021-08-24 12:54:23.661280303 -0400
@@ -240,7 +240,7 @@
   AC_CHECKING([ for SSL Library and Header files ... ])
   AC_SEARCH_HEADERS(rsa.h crypto.h x509.h pem.h ssl.h err.h,
     $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include,
-    [  AC_CHECK_LIB(crypto, CRYPTO_lock, [LIBS="$LIBS -lcrypto"],
+    [  AC_CHECK_LIB(crypto, X509_new, [LIBS="$LIBS -lcrypto"],
         AC_MSG_ERROR([ Required for SSL Crypto Library not found. ])
       )
        AC_CHECK_LIB(ssl, SSL_CTX_new,
diff -Naur partimage-0.6.9/src/client/imagefile.cpp partimage-0.6.9.patched/src/client/imagefile.cpp
--- partimage-0.6.9/src/client/imagefile.cpp	2010-07-25 11:30:31.000000000 -0400
+++ partimage-0.6.9.patched/src/client/imagefile.cpp	2021-08-24 12:54:00.205282436 -0400
@@ -783,7 +783,7 @@
   else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
     {
       showDebug(1, "open gzip\n");
-      m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
+      m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
       if (m_gzImageFile == NULL)
 	{
 	  showDebug(1, "error:%d %s\n", errno, strerror(errno));
@@ -1098,7 +1098,7 @@
     }
   else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
     {
-      m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
+      m_gzImageFile = gzdopen(m_nFdImage, "rb");
       if (m_gzImageFile == NULL)
         THROW(ERR_ERRNO, errno);
       else
diff -Naur partimage-0.6.9/src/client/imagefile.h partimage-0.6.9.patched/src/client/imagefile.h
--- partimage-0.6.9/src/client/imagefile.h	2010-07-25 11:30:31.000000000 -0400
+++ partimage-0.6.9.patched/src/client/imagefile.h	2021-08-24 12:54:00.205282436 -0400
@@ -41,7 +41,7 @@
   COptions m_options;
 
   FILE *m_fImageFile;
-  gzFile *m_gzImageFile;
+  gzFile m_gzImageFile;
   BZFILE *m_bzImageFile;
 
   int m_nFdImage;
diff -Naur partimage-0.6.9/src/client/misc.h partimage-0.6.9.patched/src/client/misc.h
--- partimage-0.6.9/src/client/misc.h	2010-07-25 11:30:31.000000000 -0400
+++ partimage-0.6.9.patched/src/client/misc.h	2021-08-24 12:54:00.206282435 -0400
@@ -36,7 +36,7 @@
 #endif
 
 #ifndef makedev
-  #define makedev(maj,min) (((maj) << 8) | min))
+  #define makedev(maj,min) (((maj) << 8) | (min))
 #endif
 
 // =======================================================
diff -Naur partimage-0.6.9/src/client/netclient.cpp partimage-0.6.9.patched/src/client/netclient.cpp
--- partimage-0.6.9/src/client/netclient.cpp	2010-07-25 11:30:31.000000000 -0400
+++ partimage-0.6.9.patched/src/client/netclient.cpp	2021-08-24 12:54:23.662280303 -0400
@@ -43,7 +43,11 @@
     {
       showDebug(3, "initializing client ssl\n");
       SSLeay_add_ssl_algorithms();
-      meth = SSLv2_client_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+      meth = TLSv1_client_method();
+#else
+      meth = TLS_client_method();
+#endif
       SSL_load_error_strings();
       ctx = SSL_CTX_new(meth);
       if (!ctx)
diff -Naur partimage-0.6.9/src/server/netserver.cpp partimage-0.6.9.patched/src/server/netserver.cpp
--- partimage-0.6.9/src/server/netserver.cpp	2010-07-25 11:30:31.000000000 -0400
+++ partimage-0.6.9.patched/src/server/netserver.cpp	2021-08-24 12:54:23.662280303 -0400
@@ -39,7 +39,11 @@
     {
       SSL_load_error_strings();
       SSLeay_add_ssl_algorithms();
-      meth = SSLv23_server_method();
+#if OPENSSL_VERSION_NUMBER < 0x10100000
+      meth = TLSv1_server_method();
+#else
+      meth = TLS_server_method();
+#endif
       ctx = SSL_CTX_new(meth);
       if (!ctx)
         {