7321N/ASolaris requires fcntl.h for open() and friends
7321N/Abrltty defines logMessage & friends in log.h
7321N/A
7321N/AFixes build errors:
7321N/A
7321N/Abrltty-5.4/Programs/beep_solaris.c: In function 'getKeyboard':
7321N/Abrltty-5.4/Programs/beep_solaris.c:30:21: warning: implicit declaration of
7321N/A function 'open' [-Wimplicit-function-declaration]
7321N/A if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
7321N/A ^
7321N/Abrltty-5.4/Programs/beep_solaris.c:30:38: error: 'O_WRONLY' undeclared
7321N/A (first use in this function)
7321N/A if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
7321N/A ^
7321N/Abrltty-5.4/Programs/beep_solaris.c:32:7: warning: implicit declaration of
7321N/A function 'logMessage' [-Wimplicit-function-declaration]
7321N/A logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
7321N/A ^
7321N/Abrltty-5.4/Programs/beep_solaris.c:32:18: error: 'LOG_DEBUG' undeclared
7321N/A (first use in this function)
7321N/A logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
7321N/A ^
7321N/Abrltty-5.4/Programs/beep_solaris.c:34:7: warning: implicit declaration of
7321N/A function 'logSystemError' [-Wimplicit-function-declaration]
7321N/A logSystemError("keyboard open");
7321N/A ^
7321N/A
7321N/Abrltty-5.4/Programs/pcm_audio.c: In function 'openPcmDevice':
7321N/Abrltty-5.4/Programs/pcm_audio.c:40:32: warning: implicit declaration of
7321N/A function 'open' [-Wimplicit-function-declaration]
7321N/A if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
7321N/A ^
7321N/Abrltty-5.4/Programs/pcm_audio.c:40:45: error: 'O_WRONLY' undeclared
7321N/A (first use in this function)
7321N/A if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
7321N/A
7321N/Abrltty-5.4/Programs/pcm_audio.c:40:54: error: 'O_NONBLOCK' undeclared
7321N/A (first use in this function)
7321N/A if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
7321N/A ^
7321N/Abrltty-5.4/Programs/pcm_audio.c:56:61: warning: implicit declaration of
7321N/A function 'strerror' [-Wimplicit-function-declaration]
7321N/A logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
7321N/A ^
7321N/Abrltty-5.4/Programs/pcm_audio.c:56:70: error: 'errno' undeclared
7321N/A (first use in this function)
7321N/A logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
7321N/A ^
7321N/A
7321N/ANeed to submit upstream.
7321N/A
7321N/A--- brltty-5.4/Programs/beep_solaris.c
7321N/A+++ brltty-5.4/Programs/beep_solaris.c
7321N/A@@ -18,6 +18,8 @@
7321N/A
7321N/A #include "prologue.h"
7321N/A+#include "log.h"
7321N/A
7321N/A+#include <fcntl.h>
7321N/A #include <sys/kbio.h>
7321N/A #include <sys/kbd.h>
7321N/A
7321N/A--- brltty-5.4/Programs/pcm_audio.c
7321N/A+++ brltty-5.4/Programs/pcm_audio.c
7321N/A@@ -19,5 +19,8 @@
7321N/A #include "prologue.h"
7321N/A
7321N/A+#include <string.h>
7321N/A+#include <errno.h>
7321N/A+#include <fcntl.h>
7321N/A #include <sys/audio.h>
7321N/A #include <stropts.h>
7321N/A