/* whether we use libjpeg */
#undef HAVE_JPEG
+/* Define to 1 if you have the `klogctl' function. */
+#undef HAVE_KLOGCTL
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/klog.h> header file. */
+#undef HAVE_SYS_KLOG_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
#AC_PROG_MKDIR_P
gl_PROMOTED_TYPE_MODE_T
+AC_CHECK_HEADERS([sys/klog.h])
+AC_CHECK_FUNCS([klogctl])
+
# Check host os
case "$host_os" in
linux*)
#include <sys/ioctl.h>
#include <sys/time.h>
#include <math.h>
-#include <sys/klog.h>
#include <sys/utsname.h>
#include "v4l2-compliance.h"
#include <sys/ioctl.h>
#include <sys/time.h>
#include <math.h>
-#include <sys/klog.h>
#include "v4l2-compliance.h"
int testChipIdent(struct node *node)
#include <sys/time.h>
#include <math.h>
#include <linux/types.h>
-#include <sys/klog.h>
#include <linux/videodev2.h>
#include <sys/time.h>
#include <math.h>
#include <linux/types.h>
-#include <sys/klog.h>
#include <linux/videodev2.h>
#include <linux/dvb/video.h>
#include <sys/time.h>
#include <dirent.h>
#include <math.h>
+
+#ifdef HAVE_SYS_KLOG_H
#include <sys/klog.h>
+#endif
#include <linux/videodev2.h>
#include <libv4l2.h>
if (options[OptLogStatus]) {
static char buf[40960];
- int len;
+ int len = -1;
if (doioctl(fd, VIDIOC_LOG_STATUS, NULL) == 0) {
printf("\nStatus Log:\n\n");
+#ifdef HAVE_KLOGCTL
len = klogctl(3, buf, sizeof(buf) - 1);
+#endif
if (len >= 0) {
char *p = buf;
char *q;
#include <sys/ioctl.h>
#include <sys/time.h>
#include <math.h>
+
+#ifdef HAVE_SYS_KLOG_H
#include <sys/klog.h>
+#endif
#include <linux/videodev2.h>
#include <media/v4l2-chip-ident.h>
if (options[OptLogStatus]) {
static char buf[40960];
- int len;
+ int len = -1;
if (doioctl(fd, VIDIOC_LOG_STATUS, NULL, "VIDIOC_LOG_STATUS") == 0) {
printf("\nStatus Log:\n\n");
+#ifdef HAVE_KLOGCTL
len = klogctl(3, buf, sizeof(buf) - 1);
+#endif
if (len >= 0) {
char *p = buf;
char *q;