SHA256
1
0
forked from pool/nvdock
nvdock/nvdock-fix-gcc10-build.patch
Michal Suchanek 767a7fbb4d Accepting request 812360 from home:michals
- Use license compatibility cruft, cleanup spec file
- Fix build with gcc10
  * nvdock-fix-gcc10-build.patch

OBS-URL: https://build.opensuse.org/request/show/812360
OBS-URL: https://build.opensuse.org/package/show/hardware/nvdock?expand=0&rev=4
2020-06-08 16:14:56 +00:00

40 lines
1.0 KiB
Diff

diff -ur nvdock-1.02.orig/src/nvdock.c nvdock-1.02/src/nvdock.c
--- nvdock-1.02.orig/src/nvdock.c 2020-06-07 23:45:25.322091577 +0200
+++ nvdock-1.02/src/nvdock.c 2020-06-07 23:54:36.049756123 +0200
@@ -33,6 +33,9 @@
#include "nvdock.h"
+argstruct *arg;
+BobStatusIcon *bsi;
+
void
bob_main_quit(void) {
gtk_main_quit();
diff -ur nvdock-1.02.orig/src/nvdock.h nvdock-1.02/src/nvdock.h
--- nvdock-1.02.orig/src/nvdock.h 2020-06-07 23:45:25.322091577 +0200
+++ nvdock-1.02/src/nvdock.h 2020-06-07 23:57:10.671907728 +0200
@@ -83,8 +83,8 @@
} argstruct;
-argstruct *arg;
-BobStatusIcon *bsi;
+extern argstruct *arg;
+extern BobStatusIcon *bsi;
void argc_argv_parse(int argc, char **argv);
diff -ur nvdock-1.02.orig/src/util.c nvdock-1.02/src/util.c
--- nvdock-1.02.orig/src/util.c 2020-06-07 23:45:25.322091577 +0200
+++ nvdock-1.02/src/util.c 2020-06-08 00:02:32.440385202 +0200
@@ -112,7 +112,7 @@
unsigned char len = strlen(string);
int a = 0, iter = 0;
- char new[len];
+ char new[len+1];
unsigned char newlen;
while(a < len) {