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) { ^ Thus, this patch replaces readdir_r with readdir. Cc: Robert Foss <robert.foss@xxxxxxxxxxxxx> Cc: Rob Herring <robh@xxxxxxxxxx> Cc: Stefan Schake <stschake@xxxxxxxxx> Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx> --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index 344326d..b9058c2 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -2858,7 +2858,7 @@ static char *drmGetMinorNameForFD(int fd, int type) if (pent == NULL) goto out_close_dir; - while (readdir_r(sysdir, pent, &ent) == 0 && ent != NULL) { + while ((ent = readdir(sysdir))) { if (strncmp(ent->d_name, name, len) == 0) { snprintf(dev_name, sizeof(dev_name), DRM_DIR_NAME "/%s", ent->d_name); -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel