summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libsndio/amsg.h4
-rw-r--r--lib/libsndio/aucat.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/libsndio/amsg.h b/lib/libsndio/amsg.h
index 760f7ec7ad8..a22ea0e1078 100644
--- a/lib/libsndio/amsg.h
+++ b/lib/libsndio/amsg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: amsg.h,v 1.11 2018/07/28 09:07:48 ratchov Exp $ */
+/* $OpenBSD: amsg.h,v 1.12 2019/07/12 06:30:55 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -99,7 +99,7 @@ struct amsg {
#define AMSG_VERSION 7
uint8_t version; /* protocol version */
uint8_t devnum; /* device number */
- uint32_t _reserved[1]; /* for future use */
+ uint32_t id; /* client id */
#define AMSG_OPTMAX 12
char opt[AMSG_OPTMAX]; /* profile name */
char who[12]; /* hint for leases */
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index b418f4e0fdd..4b86ed3fdb2 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.76 2019/06/29 06:05:26 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.77 2019/07/12 06:30:55 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -486,6 +486,7 @@ _aucat_open(struct aucat *hdl, const char *str, unsigned int mode)
hdl->wmsg.u.hello.version = AMSG_VERSION;
hdl->wmsg.u.hello.mode = htons(mode);
hdl->wmsg.u.hello.devnum = devnum;
+ hdl->wmsg.u.hello.id = htonl(getpid());
strlcpy(hdl->wmsg.u.hello.who, __progname,
sizeof(hdl->wmsg.u.hello.who));
strlcpy(hdl->wmsg.u.hello.opt, opt,