OSDN Git Service

libdrm: Use readdir instead of readdir_r to avoid build warnings
authorJohn Stultz <john.stultz@linaro.org>
Tue, 20 Mar 2018 17:48:23 +0000 (17:48 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Mar 2018 16:47:47 +0000 (16:47 +0000)
commitbb45ce4e3ac751315bfd7fbfd9e1425bf515ec0d
tree7a75236f2ff7538a2b1aad132cc1eee2561cc2b2
parent32ee9c0e0566ee6642c3df02315a2595105c0c87
libdrm: Use readdir instead of readdir_r to avoid build warnings

Building libdrm under AOSP, we see the following build warning:
external/libdrm/xf86drm.c:2861:12: warning: 'readdir_r' is deprecated: readdir_r is deprecated; use readdir instead [-Wdeprecated-declarations]
    while (readdir_r(sysdir, pent, &ent) == 0 && ent != NULL) {
           ^

Building on Linux with glibc produces the same warning.
Thus, this patch replaces readdir_r with readdir.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102031
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: remove unused variables, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
xf86drm.c