Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 862369 Details for
Bug 731024
media-libs/libdc1394-2.2.6 fails to compile: control.c:286:19: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
This patches solves the compiler errors ;-)
file_731024.txt (text/plain), 2.23 KB, created by
Jan Koester
on 2023-05-24 13:19:27 UTC
(
hide
)
Description:
This patches solves the compiler errors ;-)
Filename:
MIME Type:
Creator:
Jan Koester
Created:
2023-05-24 13:19:27 UTC
Size:
2.23 KB
patch
obsolete
>--- libdc1394/dc1394/juju/capture.c 2016-12-22 09:25:16.000000000 +0100 >+++ libdc1394/dc1394/juju/capture.c 2023-05-24 16:51:59.789038165 +0200 >@@ -321,7 +321,7 @@ > > struct { > struct fw_cdev_event_iso_interrupt i; >- __u32 headers[craw->packets_per_frame*2 + 16]; // HPK 20161209 >+ __u32 *headers; > } iso; > > if ( (policy<DC1394_CAPTURE_POLICY_MIN) || (policy>DC1394_CAPTURE_POLICY_MAX) ) >@@ -333,20 +333,25 @@ > fds[0].fd = craw->iso_fd; > fds[0].events = POLLIN; > >+ iso.headers = malloc(craw->packets_per_frame*2 + 16); // HPK 20161209 >+ > while (1) { > err = poll(fds, 1, (policy == DC1394_CAPTURE_POLICY_POLL) ? 0 : -1); > if (err < 0) { > if (errno == EINTR) > continue; > dc1394_log_error("poll() failed for device %s.", craw->filename); >+ free(iso.headers); > return DC1394_FAILURE; > } else if (err == 0) { >+ free(iso.headers); > return DC1394_SUCCESS; > } > > len = read (craw->iso_fd, &iso, sizeof iso); > if (len < 0) { > dc1394_log_error("Juju: dequeue failed to read a response: %m"); >+ free(iso.headers); > return DC1394_FAILURE; > } > >@@ -394,6 +399,8 @@ > > *frame_return = &f->frame; > >+ free(iso.headers); >+ > return DC1394_SUCCESS; > } > > >--- libdc1394/dc1394/juju/control.c 2019-04-28 02:40:21.000000000 +0200 >+++ libdc1394/dc1394/juju/control.c 2023-05-24 16:47:57.705718376 +0200 >@@ -283,7 +283,7 @@ > union { > struct { > struct fw_cdev_event_response r; >- __u32 buffer[cam->max_response_quads]; >+ __u32 *buffer; > } response; > struct fw_cdev_event_bus_reset reset; > struct fw_cdev_event_iso_resource resource; >@@ -292,6 +292,8 @@ > juju_response_info *resp_info; > juju_iso_info *iso_info; > >+ u.response.buffer = malloc(cam->max_response_quads); >+ > len = read (cam->fd, &u, sizeof u); > if (len < 0) { > dc1394_log_error("juju: Read failed: %m"); >@@ -371,6 +373,7 @@ > break; > } > >+ free(u.response.buffer); > return 0; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 731024
:
647890
|
647892
| 862369 |
884503