Axel Beckert 2022-05-13 23:47:10 +08:00 committed by openKylinBot
parent 4fb0a9e9c9
commit 7b643237fa
2 changed files with 8 additions and 8 deletions

View File

@ -24,6 +24,10 @@
#include <sys/ioctl.h> /* ioctl */ #include <sys/ioctl.h> /* ioctl */
#include <sys/types.h> /* major() */ #include <sys/types.h> /* major() */
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h> /* major() w/newer glibc */
#endif
/* Linux specific (to be outsourced in gpm2 */ /* Linux specific (to be outsourced in gpm2 */
#include <linux/serial.h> /* for serial console check */ #include <linux/serial.h> /* for serial console check */
#include <asm/ioctls.h> /* for serial console check */ #include <asm/ioctls.h> /* for serial console check */

View File

@ -443,6 +443,7 @@ void f__fix(struct passwd *pass)
} }
/*---------------------------------------------------------------------*/ /*---------------------------------------------------------------------*/
#if 0
static int f_debug_one(FILE *f, Draw *draw) static int f_debug_one(FILE *f, Draw *draw)
{ {
DrawItem *ip; DrawItem *ip;
@ -465,6 +466,7 @@ static int f_debug_one(FILE *f, Draw *draw)
#undef LINE #undef LINE
return 0; return 0;
} }
#endif
int f_debug(int mode, DrawItem *self, int uid) int f_debug(int mode, DrawItem *self, int uid)
{ {
@ -960,11 +962,9 @@ static inline void scr_dump(int fd, FILE *f, unsigned char *buffer, int vc)
/*------------*/ /*------------*/
static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc) static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
{ {
int x,y, dumpfd; int dumpfd;
char dumpname[20]; char dumpname[20];
x=buffer[2]; y=buffer[3];
/* WILL NOT WORK WITH DEVFS! FIXME! */ /* WILL NOT WORK WITH DEVFS! FIXME! */
sprintf(dumpname,"/dev/vcsa%i",vc); sprintf(dumpname,"/dev/vcsa%i",vc);
dumpfd=open(dumpname,O_WRONLY); dumpfd=open(dumpname,O_WRONLY);
@ -1196,11 +1196,7 @@ int main(int argc, char **argv)
LOG_DAEMON : LOG_USER); LOG_DAEMON : LOG_USER);
/* reap your zombies */ /* reap your zombies */
childaction.sa_handler=reap_children; childaction.sa_handler=reap_children;
#if defined(__GLIBC__) sigemptyset(&childaction.sa_mask);
__sigemptyset(&childaction.sa_mask);
#else /* __GLIBC__ */
childaction.sa_mask=0;
#endif /* __GLIBC__ */
childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */ childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
sigaction(SIGCHLD,&childaction,NULL); sigaction(SIGCHLD,&childaction,NULL);