summaryrefslogtreecommitdiff
path: root/utmpx.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-08-12 19:13:56 -0400
committerJakob Kaivo <jkk@ung.org>2020-08-12 19:13:56 -0400
commitc486885ecda309759144ebad16ec4afd566e0bee (patch)
tree505e86e0afc8341ccbceff8713e2a00fd56c6311 /utmpx.h
parent5638ea3056acb6c3c3eb10f0525f7a4b15dbcb2b (diff)
prevent prepocessor comparisons against empty tokens
Diffstat (limited to 'utmpx.h')
-rw-r--r--utmpx.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/utmpx.h b/utmpx.h
index 91c8b76..84e7b00 100644
--- a/utmpx.h
+++ b/utmpx.h
@@ -27,6 +27,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
+#if defined _XOPEN_SOURCE && _XOPEN_SOURCE - 1 < 0
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 400
+#endif
+
#if (defined _XOPEN_SOURCE && ((defined _XOPEN_SOURCE_EXTENDED && _XOPEN_SOURCE_EXTENDED == 1) || 500 <= _XOPEN_SOURCE))
/* ./src/utmpx/BOOT_TIME.c */
#define BOOT_TIME /* TODO */
@@ -51,9 +56,9 @@ SOFTWARE.
#ifndef __TYPE_struct_utmpx_DEFINED__
#define __TYPE_struct_utmpx_DEFINED__
struct utmpx {
- char ut_user[];
- char ut_id[];
- char ut_line[];
+ char ut_user[100];
+ char ut_id[100];
+ char ut_line[100];
pid_t ut_pid;
short ut_type;
struct timeval ut_tv;