File: fix_gcc9.patch

package info (click to toggle)
libgadu 1%3A1.12.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,888 kB
  • sloc: ansic: 21,748; perl: 370; makefile: 208; sh: 125
file content (43 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download | duplicates (4)
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
Description: Fix build with gcc9
Forwarded: no

---

--- libgadu-1.12.2.orig/src/dcc.c
+++ libgadu-1.12.2/src/dcc.c
@@ -80,9 +80,10 @@ int gg_dcc_request(struct gg_session *se
  * \param ut Czas w postaci uniksowej
  * \param ft Czas w postaci API WIN32
  */
-static void gg_dcc_fill_filetime(uint32_t ut, uint32_t *ft)
+static void gg_dcc_fill_filetime(uint32_t ut, struct gg_dcc *d)
 {
 	uint64_t tmp;
+	uint32_t tmp_ft[2];
 
 	tmp = ut;
 	tmp += 11644473600LL;
@@ -90,7 +91,9 @@ static void gg_dcc_fill_filetime(uint32_
 
 	tmp = gg_fix64(tmp);
 
-	memcpy(ft, &tmp, sizeof(tmp));
+	memcpy(tmp_ft, &tmp, sizeof(tmp));
+	d->file_info.atime[0] = tmp_ft[0];
+	d->file_info.atime[1] = tmp_ft[1];
 }
 
 /**
@@ -162,9 +165,9 @@ int gg_dcc_fill_file_info2(struct gg_dcc
 	if (!(st.st_mode & S_IWUSR))
 		d->file_info.mode |= gg_fix32(GG_DCC_FILEATTR_READONLY);
 
-	gg_dcc_fill_filetime(st.st_atime, d->file_info.atime);
-	gg_dcc_fill_filetime(st.st_mtime, d->file_info.mtime);
-	gg_dcc_fill_filetime(st.st_ctime, d->file_info.ctime);
+	gg_dcc_fill_filetime(st.st_atime, d);
+	gg_dcc_fill_filetime(st.st_mtime, d);
+	gg_dcc_fill_filetime(st.st_ctime, d);
 
 	d->file_info.size = gg_fix32(st.st_size);
 	d->file_info.mode = gg_fix32(0x20);	/* FILE_ATTRIBUTE_ARCHIVE */