Always compile in the speaker code. There's little savings by
omitting it, and other platforms may implement /dev/speaker in the future.
This commit is contained in:
parent
655cacab1f
commit
205d2929b8
@ -4,8 +4,4 @@
|
||||
PROG= morse
|
||||
MAN= morse.6
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
|
||||
CFLAGS += -DSPEAKER=\"/dev/speaker\"
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -63,6 +63,9 @@ static const char rcsid[] =
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Always use the speaker, let the open fail if -p is selected */
|
||||
#define SPEAKER "/dev/speaker"
|
||||
|
||||
#ifdef SPEAKER
|
||||
#include <dev/speaker/speaker.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user