Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes for Solaris #84

Merged
merged 3 commits into from Jan 3, 2017
Merged

Build fixes for Solaris #84

merged 3 commits into from Jan 3, 2017

Conversation

@alanc
Copy link
Contributor

alanc commented Jan 3, 2017

These are patches we've been using to build the brltty-5.4 packages for Solaris.

alanc added 3 commits Jan 3, 2017
Solaris 10 & 11 system headers require that if a C99 compiler is used
and _XOPEN_SOURCE is specified, that _XOPEN_SOURCE must be 600, since
prior versions of the X/Open standards only supported C89.

Fixes many errors in configure and build steps of:
/usr/include/sys/feature_tests.h:397:2: error: #error "Compiler or options
 invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications"

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Fixes build errors on Solaris of:

./beep_solaris.c:31:7: warning: implicit declaration of function ‘logMessage’ [-Wimplicit-function-declaration]
       logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
       ^
./beep_solaris.c:31:18: error: ‘LOG_DEBUG’ undeclared (first use in this function)
       logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
                  ^
./beep_solaris.c:33:7: warning: implicit declaration of function ‘logSystemError’ [-Wimplicit-function-declaration]
       logSystemError("keyboard open");
       ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Fixes build errors on Solaris of:

./beep_solaris.c: In function 'getKeyboard':
./beep_solaris.c:30:21: warning: implicit declaration of
  function 'open' [-Wimplicit-function-declaration]
     if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
                     ^
./beep_solaris.c:30:38: error: 'O_WRONLY' undeclared
  (first use in this function)
     if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
                                      ^

./pcm_audio.c: In function 'openPcmDevice':
./pcm_audio.c:40:32: warning: implicit declaration of
  function 'open' [-Wimplicit-function-declaration]
     if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
                                ^
./pcm_audio.c:40:45: error: 'O_WRONLY' undeclared
  (first use in this function)
     if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {

./pcm_audio.c:40:54: error: 'O_NONBLOCK' undeclared
  (first use in this function)
     if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
                                                      ^
./pcm_audio.c:56:61: warning: implicit declaration of
  function 'strerror' [-Wimplicit-function-declaration]
         logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
                                                             ^
./pcm_audio.c:56:70: error: 'errno' undeclared
  (first use in this function)
         logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
                                                                      ^
@DaveMielke DaveMielke merged commit 7aa7293 into brltty:master Jan 3, 2017
@DaveMielke
Copy link
Member

DaveMielke commented Jan 3, 2017

@alanc
Copy link
Contributor Author

alanc commented Jan 4, 2017

That's fine - I'd used ? just to skip over Solaris 2.1, but since that far predates the required XPG5 support it's not going to matter anyway. I pulled your changes and it still builds okay for me here.

@DaveMielke
Copy link
Member

DaveMielke commented Jan 4, 2017

@alanc
Copy link
Contributor Author

alanc commented Jan 4, 2017

By "screen content" I assume you mean in tty mode? (Since graphics mode is just the X Window System like most other Unixes.) I don't know and would have to investigate it.

Virtual consoles are supported in Solaris 11 and later - the ioctls for them are documented on http://docs.oracle.com/cd/E53394_01/html/E54777/vt-7i.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.