mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-23 03:33:34 -04:00
69 lines
2.3 KiB
Plaintext
69 lines
2.3 KiB
Plaintext
$NetBSD: patch-ab,v 1.3 2012/10/26 20:13:42 joerg Exp $
|
|
|
|
--- src/capture.c.orig 2004-02-14 20:14:20.000000000 +0000
|
|
+++ src/capture.c
|
|
@@ -68,6 +68,9 @@
|
|
#include "control.h"
|
|
#include "main.h"
|
|
|
|
+#ifndef HAVE_FDATASYNC
|
|
+#define fdatasync fsync
|
|
+#endif
|
|
|
|
uint16_t mousePointerBlack[] = { 0, 49152, 40960, 36864, 34816, 33792, 33280, 33024, 32896, 32832,
|
|
33728, 37376, 43264, 51456, 1152, 1152, 576, 576, 448, 0 };
|
|
@@ -369,7 +372,7 @@ TCbCaptureX11(XtPointer xtp, XtIntervalI
|
|
if (!fp) {
|
|
perror(file);
|
|
job->state = VC_STOP;
|
|
- return;
|
|
+ return FALSE;
|
|
}
|
|
}
|
|
if (job->state & VC_START) {
|
|
@@ -503,7 +506,7 @@ TCbCaptureX11(XtPointer xtp, XtIntervalI
|
|
job->state |= VC_START;
|
|
job->state |= VC_REC;
|
|
XVC_StartCapture(job);
|
|
- return;
|
|
+ return FALSE;
|
|
}
|
|
|
|
if ( job->flags & FLG_NOGUI ) {
|
|
@@ -572,7 +575,7 @@ TCbCaptureSHM(XtPointer xtp, XtIntervalI
|
|
if (!fp) {
|
|
perror(file);
|
|
job->state = VC_STOP;
|
|
- return;
|
|
+ return FALSE;
|
|
}
|
|
}
|
|
if (job->state & VC_START) {
|
|
@@ -599,7 +602,7 @@ TCbCaptureSHM(XtPointer xtp, XtIntervalI
|
|
job->area->height, job->area->x, job->area->y);
|
|
job->state = VC_STOP;
|
|
// CbStop(NULL, NULL, NULL);
|
|
- return;
|
|
+ return FALSE;
|
|
}
|
|
shminfo.shmid = shmget(IPC_PRIVATE,
|
|
image->bytes_per_line * image->height, IPC_CREAT|0777);
|
|
@@ -643,7 +646,7 @@ TCbCaptureSHM(XtPointer xtp, XtIntervalI
|
|
(*job->close) (fp);
|
|
else if (job->flags & FLG_SYNC) {
|
|
if (job->open == (void *(*)(char *, char*))fopen)
|
|
- fdatasync(fileno(fp));
|
|
+ fdatasync(fileno((FILE *)fp));
|
|
}
|
|
|
|
/* substract the time we needed for creating and saving
|
|
@@ -724,7 +727,7 @@ TCbCaptureSHM(XtPointer xtp, XtIntervalI
|
|
job->state |= VC_START;
|
|
job->state |= VC_REC;
|
|
XVC_StartCapture(job);
|
|
- return;
|
|
+ return FALSE;
|
|
}
|
|
|
|
if ( job->flags & FLG_NOGUI ) {
|