kmscon: fix session-include fallbacks
We must provide safe fallbacks if the register-functions are not provided as they are not compiled into kmscon. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
8b30e6cf11
commit
a0a9a7f9b4
@ -30,10 +30,11 @@
|
||||
#ifndef KMSCON_COMPOSITOR_H
|
||||
#define KMSCON_COMPOSITOR_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "kmscon_seat.h"
|
||||
|
||||
#if BUILD_ENABLE_SESSION_COMPOSITOR
|
||||
#ifdef BUILD_ENABLE_SESSION_COMPOSITOR
|
||||
|
||||
int kmscon_compositor_register(struct kmscon_session **out,
|
||||
struct kmscon_seat *seat);
|
||||
|
@ -30,10 +30,23 @@
|
||||
#ifndef KMSCON_DUMMY_H
|
||||
#define KMSCON_DUMMY_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "kmscon_seat.h"
|
||||
|
||||
#ifdef BUILD_ENABLE_SESSION_DUMMY
|
||||
|
||||
int kmscon_dummy_register(struct kmscon_session **out,
|
||||
struct kmscon_seat *seat);
|
||||
|
||||
#else /* !BUILD_ENABLE_SESSION_DUMMY */
|
||||
|
||||
static inline int kmscon_dummy_register(struct kmscon_session **out,
|
||||
struct kmscon_seat *seat)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif /* BUILD_ENABLE_SESSION_DUMMY */
|
||||
|
||||
#endif /* KMSCON_DUMMY_H */
|
||||
|
@ -33,10 +33,23 @@
|
||||
#ifndef KMSCON_TERMINAL_H
|
||||
#define KMSCON_TERMINAL_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "kmscon_seat.h"
|
||||
|
||||
#ifdef BUILD_ENABLE_SESSION_TERMINAL
|
||||
|
||||
int kmscon_terminal_register(struct kmscon_session **out,
|
||||
struct kmscon_seat *seat);
|
||||
|
||||
#else /* !BUILD_ENABLE_SESSION_TERMINAL */
|
||||
|
||||
static inline int kmscon_terminal_register(struct kmscon_session **out,
|
||||
struct kmscon_seat *seat)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif /* BUILD_ENABLE_SESSION_TERMINAL */
|
||||
|
||||
#endif /* KMSCON_TERMINAL_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user