Ravenports generated: 15 Oct 2022 03:32
[ravenports.git] / bucket_7F / xorg-driver-video-intel
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               xorg-driver-video-intel
4 VERSION=                2.99.917.916
5 EPOCH=                  1
6 KEYWORDS=               x11_drivers
7 VARIANTS=               standard
8 SDESC[standard]=        X.org legacy driver for Intel graphic chipsets
9 HOMEPAGE=               https://www.x.org/
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/archive/
14 DISTFILE[1]=            31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2:main
15 DF_INDEX=               1
16 SPKGS[standard]=        single
17
18 OPTIONS_AVAILABLE=      SNA UXA XVMC
19 OPTIONS_STANDARD=       SNA UXA XVMC
20 OPTGROUP_RADIO=         ACCEL
21 OPTDESCR[ACCEL]=        Default AccelMethod (if not specified in xorg.conf)
22 OPTGROUP[ACCEL]=        SNA UXA
23 OPT_ON[all]=            UXA XVMC
24
25 NOT_FOR_ARCH=           aarch64
26
27 BUILDRUN_DEPENDS=       xorg-server:single:standard
28                         libdrm:single:standard
29
30 USES=                   mesa libtool cpe autoreconf
31 XORG_COMPONENTS=        xorgproto pciaccess pixman
32
33 DISTNAME=               xf86-video-intel-31486f40f8e8f8923ca0799aea84b58799754564
34
35 LICENSE=                MIT:single
36 LICENSE_FILE=           MIT:{{WRKSRC}}/COPYING
37 LICENSE_SCHEME=         solo
38
39 CPE_PRODUCT=            xf86-video-intel
40 CPE_VENDOR=             x
41 FPC_EQUIVALENT=         x11-drivers/xf86-video-intel
42
43 MUST_CONFIGURE=         gnu
44 CONFIGURE_ARGS=         --disable-udev
45                         --with-builderstring="2.99.917.916"
46 CONFIGURE_ENV=          ac_cv_header_sys_sysinfo_h=no
47
48 INSTALL_TARGET=         install-strip
49
50 CFLAGS=                 -Wunused-but-set-variable
51
52 [XVMC].DESCRIPTION=                     X11 XvMC video extension support
53 [XVMC].BUILDRUN_DEPENDS_ON=             xorg-xcb-util:single:standard
54 [XVMC].CONFIGURE_ENABLE_BOTH=           xvmc
55 [XVMC].XORG_COMPONENTS_ON=              x11
56                                         xcb
57                                         xvmc
58
59 [SNA].DESCRIPTION=                      SandyBridge's New Acceleration
60 [SNA].CONFIGURE_ARGS_ON=                --with-default-accel=sna
61
62 [UXA].DESCRIPTION=                      Unified Acceleration Architecture
63 [UXA].CONFIGURE_ARGS_ON=                --with-default-accel=uxa
64
65 pre-configure:
66         # Broken by political correctness
67         ${SED} -i.PC \
68         -e 's|slave_dst|secondary_dst|g' \
69         -e 's|master_pixmap|primary_pixmap|g' \
70                 ${WRKSRC}/src/sna/sna_accel.c \
71                 ${WRKSRC}/src/uxa/intel_driver.c
72
73 pre-configure-dragonfly:
74         # Prefer to use dfly specific sigjmp_buf for less errors
75         ${REINPLACE_CMD} -e 's|jmp_buf |sigjmp_buf |g' \
76                 ${WRKSRC}/src/sna/sna.h \
77                 ${WRKSRC}/src/sna/sna_accel.c
78
79 [FILE:531:descriptions/desc.single]
80 The xf86-video-intel module is an open-source 2D graphics driver for
81 the X Window System as implemented by X.org. It supports a variety of
82 Intel graphics chipsets including:
83
84         i810/i810e/i810-dc100,i815,
85         i830M,845G,852GM,855GM,865G,
86         915G/GM,945G/GM/GME,946GZ
87         G/GM/GME/Q965,
88         G/Q33,G/Q35,G41,G/Q43,G/GM/Q45
89         PineView-M (Atom N400 series)
90         PineView-D (Atom D400/D500 series)
91         Intel(R) HD Graphics,
92         Intel(R) Iris(TM) Graphics,
93         Intel(R) Iris(TM) Pro Graphics.
94
95
96 [FILE:127:distinfo]
97 e47eb678c681d80df138e897ee27c79f9b42e3517d55b1f0684e9a70361c8218      1250745 31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2
98
99
100 [FILE:324:manifests/plist.single]
101 %%ONLY-LINUX%%libexec/xf86-video-intel-backlight-helper
102 %%ONLY-LINUX%%share/polkit-1/actions/org.x.xf86-video-intel.backlight-helper.policy
103 lib/
104  libI810XvMC.so
105  libI810XvMC.so.1
106  libI810XvMC.so.1.0.0
107  libIntelXvMC.so
108  libIntelXvMC.so.1
109  libIntelXvMC.so.1.0.0
110 lib/xorg/modules/drivers/intel_drv.so
111 share/man/man4/intel.4.gz
112
113
114 [FILE:1202:patches/patch-benchmarks_dri3-swap.c]
115 dri3-swap.c:237:24: error: variable 'tmp' is uninitialized when used here [-Werror,-Wuninitialized]
116                         list_for_each_entry(tmp, &mru, link) {
117                                             ^~~
118 dri3-swap.c:117:45: note: expanded from macro 'list_for_each_entry'
119     for (pos = __container_of((head)->next, pos, member);               \
120                                             ^~~
121 dri3-swap.c:114:41: note: expanded from macro '__container_of'
122     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
123                                         ^~~~~~
124 dri3-swap.c:236:22: note: initialize the variable 'tmp' to silence this warning
125                         struct buffer *tmp, *b = NULL;
126                                           ^
127                                            = NULL
128
129 --- benchmarks/dri3-swap.c.orig 2019-02-21 22:26:50 UTC
130 +++ benchmarks/dri3-swap.c
131 @@ -233,7 +233,7 @@ static void run(Display *dpy, Window win)
132         clock_gettime(CLOCK_MONOTONIC, &start);
133         do {
134                 for (n = 0; n < 1000; n++) {
135 -                       struct buffer *tmp, *b = NULL;
136 +                       struct buffer *tmp = NULL, *b = NULL;
137                         list_for_each_entry(tmp, &mru, link) {
138                                 if (!tmp->busy) {
139                                         b = tmp;
140
141
142 [FILE:864:patches/patch-hyphen]
143 Add hyphen to RANDR output names for consistency with modesetting(4x)
144
145 --- src/sna/sna_display.c.orig  2018-12-03 09:01:25 UTC
146 +++ src/sna/sna_display.c
147 @@ -5126,7 +5126,7 @@ sna_output_add(struct sna *sna, unsigned id, unsigned 
148                 output_name = output_names[compat_conn.conn.connector_type];
149         else
150                 output_name = "UNKNOWN";
151 -       len = snprintf(name, 32, "%s%d", output_name, compat_conn.conn.connector_type_id);
152 +       len = snprintf(name, 32, "%s-%d", output_name, compat_conn.conn.connector_type_id);
153         if (output_ignored(scrn, name))
154                 return 0;
155  
156 --- src/uxa/intel_display.c.orig        2018-12-03 09:01:25 UTC
157 +++ src/uxa/intel_display.c
158 @@ -1484,7 +1484,7 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnecto
159                 else
160                         output_name = "UNKNOWN";
161  
162 -               snprintf(name, 32, "%s%d",
163 +               snprintf(name, 32, "%s-%d",
164                          output_name, koutput->connector_type_id);
165         }
166  }
167
168
169 [FILE:799:patches/patch-prefer-iris]
170 Chase https://gitlab.freedesktop.org/mesa/mesa/-/commit/adaa3583f507
171
172 --- src/sna/sna_dri2.c.orig     2020-11-16 15:23:28 UTC
173 +++ src/sna/sna_dri2.c
174 @@ -3707,8 +3707,10 @@ static const char *dri_driver_name(struct sna *sna)
175                         return has_i830_dri() ? "i830" : "i915";
176                 else if (sna->kgem.gen < 040)
177                         return "i915";
178 -               else
179 +               else if (sna->kgem.gen < 0100)
180                         return "i965";
181 +               else
182 +                       return "iris";
183         }
184  
185         return s;
186 --- src/uxa/intel_dri.c.orig    2020-11-16 15:23:28 UTC
187 +++ src/uxa/intel_dri.c
188 @@ -1540,8 +1540,10 @@ static const char *dri_driver_name(intel_screen_privat
189                         return has_i830_dri() ? "i830" : "i915";
190                 else if (INTEL_INFO(intel)->gen < 040)
191                         return "i915";
192 -               else
193 +               else if (INTEL_INFO(intel)->gen < 0100)
194                         return "i965";
195 +               else
196 +                       return "iris";
197         }
198  
199         return s;
200
201
202 [FILE:955:patches/patch-src_intel__device.c]
203 i915 requires KMS, so FreeBSD uses suffix to distinguish drm1 and drm2 drivers.
204 drm-kmod kept the same name at the cost of conflict with in-base drm2.
205
206 --- src/intel_device.c.orig     2021-01-15 20:59:05 UTC
207 +++ src/intel_device.c
208 @@ -204,6 +204,7 @@ static inline struct intel_device *intel
209  }
210  
211  static const char *kernel_module_names[] ={
212 +       "i915kms",
213         "i915",
214         NULL,
215  };
216 @@ -424,6 +425,10 @@ static int __intel_open_device__legacy(c
217                  "pci:%04x:%02x:%02x.%d",
218                  pci->domain, pci->bus, pci->dev, pci->func);
219  
220 +#if defined(__DragonFly__)
221 +       /* assume modesetting for i915, allow multiple loads and no fbcon */
222 +       load_i915_kernel_module();
223 +#else
224         ret = drmCheckModesettingSupported(id);
225         if (ret) {
226                 if (load_i915_kernel_module() == 0)
227 @@ -433,6 +438,7 @@ static int __intel_open_device__legacy(c
228                 /* Be nice to the user and load fbcon too */
229                 (void)xf86LoadKernelModule("fbcon");
230         }
231 +#endif
232  
233         return fd_set_nonblock(drmOpen(NULL, id));
234  }
235
236
237 [FILE:8142:patches/patch-src_intel__list.h]
238 kgem.c:2864:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
239         list_for_each_entry(bo, &kgem->snoop, list) {
240                             ^~
241 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
242     for (pos = __container_of((head)->next, pos, member);               \
243                                             ^~~
244 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
245     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
246                                         ^~~~~~
247 kgem.c:2849:20: note: initialize the variable 'bo' to silence this warning
248         struct kgem_bo *bo, *first = NULL;
249                           ^
250                            = NULL
251 kgem.c:3118:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
252         list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
253                                  ^~
254 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
255     for (pos = __container_of((head)->next, pos, member),               \
256                                             ^~~
257 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
258     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
259                                         ^~~~~~
260 kgem.c:3115:20: note: initialize the variable 'bo' to silence this warning
261         struct kgem_bo *bo, *next;
262                           ^
263                            = NULL
264 kgem.c:3429:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
265         list_for_each_entry_safe(bo, next, &rq->buffers, request) {
266                                  ^~
267 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
268     for (pos = __container_of((head)->next, pos, member),               \
269                                             ^~~
270 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
271     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
272                                         ^~~~~~
273 kgem.c:3425:20: note: initialize the variable 'bo' to silence this warning
274         struct kgem_bo *bo, *next;
275                           ^
276                            = NULL
277 kgem.c:3541:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
278         list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
279                                  ^~
280 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
281     for (pos = __container_of((head)->next, pos, member),               \
282                                             ^~~
283 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
284     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
285                                         ^~~~~~
286 kgem.c:3539:24: note: initialize the variable 'bo' to silence this warning
287         struct kgem_buffer *bo, *next;
288                               ^
289                                = NULL
290 kgem.c:3930:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
291         list_for_each_entry(bo, list, list) {
292                             ^~
293 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
294     for (pos = __container_of((head)->next, pos, member);               \
295                                             ^~~
296 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
297     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
298                                         ^~~~~~
299 kgem.c:3928:20: note: initialize the variable 'bo' to silence this warning
300         struct kgem_bo *bo;
301                           ^
302                            = NULL
303 kgem.c:4670:23: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
304                 list_for_each_entry(bo, cache, vma) {
305                                     ^~
306 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
307     for (pos = __container_of((head)->next, pos, member);               \
308                                             ^~~
309 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
310     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
311                                         ^~~~~~
312 kgem.c:4576:20: note: initialize the variable 'bo' to silence this warning
313         struct kgem_bo *bo, *first = NULL;
314                           ^
315                            = NULL
316 kgem.c:5411:31: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
317                 list_for_each_entry_reverse(bo, &kgem->scanout, list) {
318                                             ^~
319 ../../src/intel_list.h:333:45: note: expanded from macro 'list_for_each_entry_reverse'
320     for (pos = __container_of((head)->prev, pos, member);               \
321                                             ^~~
322 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
323     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
324                                         ^~~~~~
325 kgem.c:5380:20: note: initialize the variable 'bo' to silence this warning
326         struct kgem_bo *bo;
327                           ^
328                            = NULL
329 kgem.c:7225:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
330         list_for_each_entry(bo, buffers, request) {
331                             ^~
332 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
333     for (pos = __container_of((head)->next, pos, member);               \
334                                             ^~~
335 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
336     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
337                                         ^~~~~~
338 kgem.c:7223:20: note: initialize the variable 'bo' to silence this warning
339         struct kgem_bo *bo;
340                           ^
341                            = NULL
342 kgem.c:7517:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
343         list_for_each_entry(bo, &kgem->batch_buffers, base.list) {
344                             ^~
345 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
346     for (pos = __container_of((head)->next, pos, member);               \
347                                             ^~~
348 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
349     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
350                                         ^~~~~~
351 kgem.c:7503:24: note: initialize the variable 'bo' to silence this warning
352         struct kgem_buffer *bo;
353                               ^
354                                = NULL
355
356 --- src/intel_list.h.orig       2019-02-21 22:26:50 UTC
357 +++ src/intel_list.h
358 @@ -325,12 +325,12 @@ list_is_empty(const struct list *head)
359   *
360   */
361  #define list_for_each_entry(pos, head, member)                         \
362 -    for (pos = __container_of((head)->next, pos, member);              \
363 +    for (pos = NULL, pos = __container_of((head)->next, pos, member);  \
364          &pos->member != (head);                                        \
365          pos = __container_of(pos->member.next, pos, member))
366  
367 -#define list_for_each_entry_reverse(pos, head, member)                         \
368 -    for (pos = __container_of((head)->prev, pos, member);              \
369 +#define list_for_each_entry_reverse(pos, head, member)                 \
370 +    for (pos = NULL, pos = __container_of((head)->prev, pos, member);  \
371          &pos->member != (head);                                        \
372          pos = __container_of(pos->member.prev, pos, member))
373  
374 @@ -342,7 +342,7 @@ list_is_empty(const struct list *head)
375   * See list_for_each_entry for more details.
376   */
377  #define list_for_each_entry_safe(pos, tmp, head, member)               \
378 -    for (pos = __container_of((head)->next, pos, member),              \
379 +    for (pos = NULL, pos = __container_of((head)->next, pos, member),  \
380          tmp = __container_of(pos->member.next, pos, member);           \
381          &pos->member != (head);                                        \
382          pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
383
384
385 [FILE:1007:patches/patch-src_sna_kgem.c]
386 --- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC
387 +++ src/sna/kgem.c
388 @@ -71,7 +71,11 @@ search_snoop_cache(struct kgem *kgem, un
389  #define DBG_NO_USERPTR 0
390  #define DBG_NO_UNSYNCHRONIZED_USERPTR 0
391  #define DBG_NO_COHERENT_MMAP_GTT 0
392 +#if defined __DragonFLy__
393 +#define DBG_NO_LLC 1
394 +#else
395  #define DBG_NO_LLC 0
396 +#endif
397  #define DBG_NO_SEMAPHORES 0
398  #define DBG_NO_MADV 0
399  #define DBG_NO_UPLOAD_CACHE 0
400 @@ -1189,13 +1193,18 @@ static int gem_param(struct kgem *kgem,
401  static bool test_has_execbuffer2(struct kgem *kgem)
402  {
403         struct drm_i915_gem_execbuffer2 execbuf;
404 +       int ret;
405  
406         memset(&execbuf, 0, sizeof(execbuf));
407         execbuf.buffer_count = 1;
408  
409 -       return do_ioctl(kgem->fd,
410 -                        DRM_IOCTL_I915_GEM_EXECBUFFER2,
411 -                        &execbuf) == -EFAULT;
412 +       ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
413 +#ifdef __FreeBSD__
414 +       /* XXX FreeBSD returns ENOENT instead of EFAULT. */
415 +       if (ret == -ENOENT)
416 +               return true;
417 +#endif
418 +       return ret == -EFAULT;
419  }
420  
421  static bool test_has_no_reloc(struct kgem *kgem)
422
423
424 [FILE:387:patches/patch-src_sna_sna__video.c]
425 --- src/sna/sna_video.c.orig    2021-01-15 20:59:05 UTC
426 +++ src/sna/sna_video.c
427 @@ -59,7 +59,7 @@
428  #include "intel_options.h"
429  
430  #include <xf86xv.h>
431 -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
432 +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
433  #include <sys/types.h>
434  #include <sys/endian.h>
435  #ifdef __OpenBSD__
436
437
438 [FILE:4765:patches/patch-test_present-speed.c]
439 present-speed.c:317:23: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
440                 list_for_each_entry(b, &mru, link)
441                                     ^
442 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
443     for (pos = __container_of((head)->next, pos, member);               \
444                                             ^~~
445 present-speed.c:112:41: note: expanded from macro '__container_of'
446     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
447                                         ^~~~~~
448 present-speed.c:297:19: note: initialize the variable 'b' to silence this warning
449                 struct buffer *b;
450                                 ^
451                                  = NULL
452 present-speed.c:229:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
453       [-Werror,-Wsometimes-uninitialized]
454                         struct buffer *tmp, *b = NULL;
455                         ~~~~~~~~~~~~~~~^~~
456 present-speed.c:231:24: note: uninitialized use occurs here
457                         list_for_each_entry(tmp, &mru, link) {
458                                             ^~~
459 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
460     for (pos = __container_of((head)->next, pos, member);               \
461                                             ^~~
462 present-speed.c:112:41: note: expanded from macro '__container_of'
463     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
464                                         ^~~~~~
465 present-speed.c:229:22: note: initialize the variable 'tmp' to silence this warning
466                         struct buffer *tmp, *b = NULL;
467                                           ^
468                                            = NULL
469 present-speed.c:557:24: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
470                         list_for_each_entry(b, &pp[i].mru, link)
471                                             ^
472 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
473     for (pos = __container_of((head)->next, pos, member);               \
474                                             ^~~
475 present-speed.c:112:41: note: expanded from macro '__container_of'
476     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
477                                         ^~~~~~
478 present-speed.c:537:20: note: initialize the variable 'b' to silence this warning
479                         struct buffer *b;
480                                         ^
481                                          = NULL
482 present-speed.c:467:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
483       [-Werror,-Wsometimes-uninitialized]
484                         struct buffer *tmp, *b = NULL;
485                         ~~~~~~~~~~~~~~~^~~
486 present-speed.c:469:24: note: uninitialized use occurs here
487                         list_for_each_entry(tmp, &pp[i].mru, link) {
488                                             ^~~
489 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
490     for (pos = __container_of((head)->next, pos, member);               \
491                                             ^~~
492 present-speed.c:112:41: note: expanded from macro '__container_of'
493     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
494                                         ^~~~~~
495 present-speed.c:467:22: note: initialize the variable 'tmp' to silence this warning
496                         struct buffer *tmp, *b = NULL;
497                                           ^
498                                            = NULL
499
500 --- test/present-speed.c.orig   2019-02-21 22:26:50 UTC
501 +++ test/present-speed.c
502 @@ -226,7 +226,7 @@ static void run(Display *dpy, Window win, const char *
503         clock_gettime(CLOCK_MONOTONIC, &start);
504         do {
505                 for (n = 0; n < 1000; n++) {
506 -                       struct buffer *tmp, *b = NULL;
507 +                       struct buffer *tmp = NULL, *b = NULL;
508  retry:
509                         list_for_each_entry(tmp, &mru, link) {
510                                 if (tmp->fence.xid)
511 @@ -294,7 +294,7 @@ retry:
512         } while (end.tv_sec < start.tv_sec + 10);
513  
514         if (options & DRI3) {
515 -               struct buffer *b;
516 +               struct buffer *b = NULL;
517                 XID pixmap;
518  
519                 pixmap = xcb_generate_id(c);
520 @@ -464,7 +464,7 @@ static void perpixel(Display *dpy,
521         clock_gettime(CLOCK_MONOTONIC, &start);
522         do {
523                 for (i = 0; i < sz; i++) {
524 -                       struct buffer *tmp, *b = NULL;
525 +                       struct buffer *tmp = NULL, *b = NULL;
526  retry:
527                         list_for_each_entry(tmp, &pp[i].mru, link) {
528                                 if (tmp->fence.xid)
529 @@ -534,7 +534,7 @@ retry:
530         for (i = 0; i < sz; i++) {
531                 if (options & DRI3) {
532                         int depth = DefaultDepth(dpy, DefaultScreen(dpy));
533 -                       struct buffer *b;
534 +                       struct buffer *b = NULL;
535                         XID pixmap;
536  
537                         pixmap = xcb_generate_id(c);
538
539
540 [FILE:284:dragonfly/patch-src_sna_sna__threads.c]
541 --- src/sna/sna_threads.c.orig  2018-12-03 09:01:25 UTC
542 +++ src/sna/sna_threads.c
543 @@ -29,6 +29,9 @@
544  #include "config.h"
545  #endif
546  
547 +#define _WITH_GETLINE  /* to expose getline() in stdio.h on FreeBSD */
548 +#include <stdio.h>     /* for getline() */
549 +
550  #include "sna.h"
551  
552  #include <unistd.h>
553