summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2021-12-23 20:47:27 +0200
committerToomas Soome <tsoome@me.com>2022-01-25 21:16:57 +0200
commit2829495d7d810156bdfd454b8a1ef0f54eac9733 (patch)
tree5ab5826b1e162d5a2eeafab522b0da50966ad90a /usr/src
parent1b863af9bc9a5c76ed773e129889fc19dbf9e41c (diff)
downloadillumos-gate-2829495d7d810156bdfd454b8a1ef0f54eac9733.tar.gz
14386 libc: build errors with gcc 11
Reviewed by: Andy Fiddaman <andy@omnios.org> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libc/port/gen/ndbm.c12
-rw-r--r--usr/src/lib/libc/port/print/doprnt.c10
-rw-r--r--usr/src/lib/libc/port/sys/utimesys.c8
3 files changed, 14 insertions, 16 deletions
diff --git a/usr/src/lib/libc/port/gen/ndbm.c b/usr/src/lib/libc/port/gen/ndbm.c
index f1fb3603be..79ef61e590 100644
--- a/usr/src/lib/libc/port/gen/ndbm.c
+++ b/usr/src/lib/libc/port/gen/ndbm.c
@@ -26,7 +26,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
@@ -38,8 +38,6 @@
* contributors.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "lint.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -841,7 +839,7 @@ setbit(DBM *db)
}
static datum
-makdatum(char buf[PBLKSIZ], int n)
+makdatum(char *buf, int n)
{
short *sp;
int t;
@@ -886,7 +884,7 @@ cmpdatum(datum d1, datum d2)
}
static int
-finddatum(char buf[PBLKSIZ], datum item)
+finddatum(char *buf, datum item)
{
short *sp;
int i, n, j;
@@ -962,7 +960,7 @@ dcalchash(datum item)
* Delete pairs of items (n & n+1).
*/
static int
-delitem(char buf[PBLKSIZ], int n)
+delitem(char *buf, int n)
{
short *sp, *sp1;
int i1, i2;
@@ -993,7 +991,7 @@ delitem(char buf[PBLKSIZ], int n)
* Add pairs of items (item & item1).
*/
static int
-additem(char buf[PBLKSIZ], datum item, datum item1)
+additem(char *buf, datum item, datum item1)
{
short *sp;
int i1, i2;
diff --git a/usr/src/lib/libc/port/print/doprnt.c b/usr/src/lib/libc/port/print/doprnt.c
index 8a6dfd5e90..04f1e4ad0a 100644
--- a/usr/src/lib/libc/port/print/doprnt.c
+++ b/usr/src/lib/libc/port/print/doprnt.c
@@ -25,7 +25,7 @@
*/
/* Copyright (c) 1988 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* _doprnt: common code for printf, fprintf, sprintf
@@ -166,9 +166,9 @@ static const wchar_t widenullstr[] = L"(null)";
}
#define PAD(s, n) { ssize_t nn; \
- for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
- if (!_dowrite(s, PAD_LEN, iop, &bufptr)) \
- return (EOF); \
+ for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
+ if (!_dowrite(s, PAD_LEN, iop, &bufptr)) \
+ return (EOF); \
PUT(s, nn); \
}
@@ -522,7 +522,7 @@ _ndoprnt(const char *format, va_list in_args, FILE *iop, int prflag)
ssize_t prefixlength, suffixlength;
/* Combined length of leading zeroes, trailing zeroes, and suffix */
- ssize_t otherlength;
+ ssize_t otherlength;
/* The value being converted, if integer */
ssize_t val;
diff --git a/usr/src/lib/libc/port/sys/utimesys.c b/usr/src/lib/libc/port/sys/utimesys.c
index 55e53dbb53..c291202491 100644
--- a/usr/src/lib/libc/port/sys/utimesys.c
+++ b/usr/src/lib/libc/port/sys/utimesys.c
@@ -94,20 +94,20 @@ utimes_impl(const char *path, const struct timeval times[2], int flag)
}
int
-utimes(const char *path, const struct timeval times[2])
+utimes(const char *path, const struct timeval *times)
{
return (utimes_impl(path, times, 0));
}
int
-lutimes(const char *path, const struct timeval times[2])
+lutimes(const char *path, const struct timeval *times)
{
return (utimes_impl(path, times, AT_SYMLINK_NOFOLLOW));
}
#pragma weak _futimesat = futimesat
int
-futimesat(int fd, const char *path, const struct timeval times[2])
+futimesat(int fd, const char *path, const struct timeval *times)
{
struct timeval ltimes[2];
timespec_t ts[2];
@@ -133,7 +133,7 @@ futimesat(int fd, const char *path, const struct timeval times[2])
}
int
-futimes(int fd, const struct timeval times[2])
+futimes(int fd, const struct timeval *times)
{
return (futimesat(fd, NULL, times));
}