[packages/perl-Authen-Smb] add missing includes and prototypes to fix build with gcc 14

atler atler at pld-linux.org
Thu Jul 31 13:33:03 CEST 2025


commit ec2df1f2969f0936e7fbfaf4840db9d96d1d1768
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Jul 31 13:32:14 2025 +0200

    add missing includes and prototypes to fix build with gcc 14

 includes.patch       | 42 ++++++++++++++++++++++++++++++++++++++++++
 perl-Authen-Smb.spec |  4 ++++
 prototypes.patch     | 26 ++++++++++++++++++++++++++
 3 files changed, 72 insertions(+)
---
diff --git a/perl-Authen-Smb.spec b/perl-Authen-Smb.spec
index 23f46e1..789b32a 100644
--- a/perl-Authen-Smb.spec
+++ b/perl-Authen-Smb.spec
@@ -13,6 +13,8 @@ License:	GPL v2+
 Group:		Development/Languages/Perl
 Source0:	http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
 # Source0-md5:	97d8aee872160eeabd0c08a7b0985216
+Patch0:		includes.patch
+Patch1:		prototypes.patch
 URL:		http://search.cpan.org/dist/Authen-Smb/
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	rpm-perlprov >= 4.1-13
@@ -32,6 +34,8 @@ uwierzytelniania. Do określenia serwerów należy używać nazw NT.
 
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
+%patch -P0 -p1
+%patch -P1 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/includes.patch b/includes.patch
new file mode 100644
index 0000000..c8d7902
--- /dev/null
+++ b/includes.patch
@@ -0,0 +1,42 @@
+--- Authen-Smb-0.91/smbval/session.c.orig	1999-06-07 03:54:22.000000000 +0200
++++ Authen-Smb-0.91/smbval/session.c	2025-07-31 02:33:50.996141269 +0200
+@@ -24,6 +24,7 @@
+ */
+ 
+ #include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
+ 
+ int RFCNB_errno = 0;
+--- Authen-Smb-0.91/Smb.xs.orig	1999-06-07 03:54:22.000000000 +0200
++++ Authen-Smb-0.91/Smb.xs	2025-07-31 02:37:52.777602489 +0200
+@@ -4,6 +4,7 @@
+ #include "EXTERN.h"
+ #include "perl.h"
+ #include "XSUB.h"
++#include "smbval/valid.h"
+ #ifdef __cplusplus
+ }
+ #endif
+--- Authen-Smb-0.91/smbval/smblib-util.c.orig	1999-06-07 03:54:23.000000000 +0200
++++ Authen-Smb-0.91/smbval/smblib-util.c	2025-07-31 02:49:12.418371529 +0200
+@@ -25,6 +25,7 @@
+ 
+ #include "smblib-priv.h"
+ #include <malloc.h>
++#include <string.h>
+ 
+ #include "rfcnb.h"
+ 
+--- Authen-Smb-0.91/smbval/smblib.c.orig	1999-06-07 03:54:23.000000000 +0200
++++ Authen-Smb-0.91/smbval/smblib.c	2025-07-31 13:16:17.940688982 +0200
+@@ -34,7 +34,9 @@
+ 
+ #include "rfcnb.h"
+ 
++#include <ctype.h>
+ #include <signal.h>
++#include <string.h>
+ 
+ SMB_State_Types SMBlib_State;
+ 
diff --git a/prototypes.patch b/prototypes.patch
new file mode 100644
index 0000000..429d33c
--- /dev/null
+++ b/prototypes.patch
@@ -0,0 +1,26 @@
+--- ./smbval/smblib-priv.h.orig	2025-07-31 02:44:33.140020863 +0200
++++ ./smbval/smblib-priv.h	2025-07-31 13:06:31.927252156 +0200
+@@ -623,3 +623,12 @@
+ 
+ SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con, SMB_Tree_Handle tree,
+ 				char *path, char *password, char *dev);
++
++int SMB_Init();
++int SMB_Negotiate(SMB_Handle_Type Con_Handle, char *Prots[]);
++int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
++int SMB_Logon_Server(SMB_Handle_Type Con_Handle, char *UserName, 
++		     char *PassWord);
++void SMB_Get_My_Name(char *name, int len);
++#define uchar unsigned char
++void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24);
+--- Authen-Smb-0.91/smbval/smblib.c.orig	1999-06-07 03:54:23.000000000 +0200
++++ Authen-Smb-0.91/smbval/smblib.c	2025-07-31 13:16:17.940688982 +0200
+@@ -39,6 +39,8 @@
+ #include <string.h>
+ 
+ SMB_State_Types SMBlib_State;
++int RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt);
++int RFCNB_Set_Sock_NoDelay(struct RFCNB_Con *con_Handle, BOOL yn);
+ 
+ /* Initialize the SMBlib package     */
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Authen-Smb.git/commitdiff/ec2df1f2969f0936e7fbfaf4840db9d96d1d1768



More information about the pld-cvs-commit mailing list