! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Check for sched_getparam/sched_setscheduler instead of sched.h
Status:
RESOLVED: FIXED
Product:
Tumbler
Component:
General

Comments

Description Landry Breuil editbugs 2009-12-08 18:03:03 CET
tumbler configure.ac shouldn't check for sched.h header, but directly the functions it needs in there (using some ac_check_func voodoo ?). 

OpenBSD has sched.h (with declarations for the given funcs, as posix requires it) but there is no implementation of the functions, hence tumblerd fails to link with undefined refs to sched_getparam/sched_setscheduler.
Comment 1 Jannis Pohlmann editbugs 2009-12-08 18:18:01 CET
Good point. I'll get that fixed.
Comment 2 Jannis Pohlmann editbugs 2010-01-09 20:52:58 CET
Created attachment 2773 
Possible fix of the problem

Can you check whether the attached patch fixes the issue?
Comment 3 Landry Breuil editbugs 2010-01-11 19:48:14 CET
That does the trick, but you also have to wrap the declaration of struct sched_param sp in line 342 between #if defined (HAVE_sched_getparam) && defined (HAVE_sched_setscheduler) / #endif guards otherwise it fails to compile with -Werror / debug=full as sp is declared but unused :)

As a sidenote (yeah, sorry for hijacking this bz), in plugins/jpeg-thumbnailer/jpeg-thumbnailer.c you might want to add
#include <sys/types.h> between  #ifdef HAVE_SYS_MMAN_H and #include <sys/mman.h>, as here mmap() requires both headers.
Comment 4 Jannis Pohlmann editbugs 2010-11-07 14:54:46 CET
This should be fixed in master. Please re-open if this is not the case.

commit edad4f4a34e9c0c61ba6f09415b6b892583a7fda
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Sun Nov 7 14:49:18 2010 +0100

    Fix sched_getparam/sched_setscheduler code on OpenBSD (bug #6061).
    
    The check for sched.h and linux/sched.h is not enough. We also need to
    check for sched_getparam() and sched_setscheduler(), as on OpenBSD has
    no implementation of these functions.

Bug #6061

Reported by:
Landry Breuil
Reported on: 2009-12-08
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Attachments

Possible fix of the problem (908 bytes, patch)
2010-01-09 20:52 CET , Jannis Pohlmann
no flags

Additional information