File: upstream-fix-gcc15.patch

package info (click to toggle)
libpam-ssh 2.3%2Bds-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,432 kB
  • sloc: ansic: 19,197; makefile: 95; sh: 44
file content (54 lines) | stat: -rw-r--r-- 1,331 bytes parent folder | download
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
Description: upstream: fix build with gcc-15
 This patch fixes a naming collision with C23 boolean type bool:
 the name `bool' is replaced with the name `flag'.
Origin: Debian
Forwarded: dormant-upstream
Forwarded: https://sourceforge.net/p/pam-ssh/bugs/18/
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2025-09-14

--- a/pam_option.h
+++ b/pam_option.h
@@ -47,7 +47,7 @@
 struct options {
 	struct {
 		const char *name;
-		int bool;
+		int flag;
 		char *arg;
 	} opt[PAM_MAX_OPTIONS];
 };
--- a/pam_std_option.c
+++ b/pam_std_option.c
@@ -81,7 +81,7 @@
 		else
 			options->opt[i].name = NULL;
 
-		options->opt[i].bool = 0;
+		options->opt[i].flag = 0;
 		options->opt[i].arg = NULL;
 	}
 
@@ -95,13 +95,13 @@
 				break;
 			arglen = strlen(options->opt[i].name);
 			if (strcmp(argv[j], options->opt[i].name) == 0) {
-				options->opt[i].bool = 1;
+				options->opt[i].flag = 1;
 				found = 1;
 				break;
 			}
 			else if (strncmp(argv[j], options->opt[i].name, arglen)
 			    == 0 && argv[j][arglen] == '=')  {
-				options->opt[i].bool = 1;
+				options->opt[i].flag = 1;
 				options->opt[i].arg
 				    = strdup(&argv[j][arglen + 1]);
 				found = 1;
@@ -119,5 +119,5 @@
 {
 	if (arg != NULL)
 		*arg = options->opt[option].arg;
-	return options->opt[option].bool;
+	return options->opt[option].flag;
 }