applied Salmi's patch
This commit is contained in:
parent
0f1157d7e6
commit
597d0f27f5
2 changed files with 5 additions and 4 deletions
|
@ -17,7 +17,7 @@ LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11
|
||||||
# flags
|
# flags
|
||||||
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H
|
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H
|
||||||
LDFLAGS = ${LIBS}
|
LDFLAGS = ${LIBS}
|
||||||
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
|
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H
|
||||||
#LDFLAGS = -g ${LIBS}
|
#LDFLAGS = -g ${LIBS}
|
||||||
|
|
||||||
# On *BSD remove -DHAVE_SHADOW_H from CFLAGS
|
# On *BSD remove -DHAVE_SHADOW_H from CFLAGS
|
||||||
|
|
7
slock.c
7
slock.c
|
@ -1,7 +1,7 @@
|
||||||
/* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
|
/* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
|
||||||
* See LICENSE file for license details.
|
* See LICENSE file for license details.
|
||||||
*/
|
*/
|
||||||
#define _XOPEN_SOURCE
|
#define _XOPEN_SOURCE 500
|
||||||
|
|
||||||
#if HAVE_SHADOW_H
|
#if HAVE_SHADOW_H
|
||||||
#include <shadow.h>
|
#include <shadow.h>
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -22,13 +23,13 @@ int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
char curs[] = {0, 0, 0, 0, 0, 0, 0, 0};
|
char curs[] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
char buf[32], passwd[256];
|
char buf[32], passwd[256];
|
||||||
int num, prev_nitem, screen;
|
int num, screen;
|
||||||
#if HAVE_SHADOW_H
|
#if HAVE_SHADOW_H
|
||||||
struct spwd *sp;
|
struct spwd *sp;
|
||||||
#else
|
#else
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
#endif
|
#endif
|
||||||
unsigned int i, len;
|
unsigned int len;
|
||||||
Bool running = True;
|
Bool running = True;
|
||||||
Cursor invisible;
|
Cursor invisible;
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
|
Loading…
Reference in a new issue