xiaoxiang781216 commented on a change in pull request #5837: URL: https://github.com/apache/incubator-nuttx/pull/5837#discussion_r835136744
########## File path: libs/libc/uuid/lib_uuid_create.c ########## @@ -22,9 +22,40 @@ * Included Files ****************************************************************************/ +#include <sys/random.h> +#include <errno.h> #include <stdlib.h> #include <uuid.h> +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int uuid_getrandom(FAR void *buf, size_t size, int flags) +{ + FAR char *tmp = buf; + ssize_t ret; + + while (size > 0) + { + ssize_t ret = getrandom(tmp, size, flags); Review comment: No, we can't since tmp/buf need keep the last iterator to make the next loop fill the next part of buffer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org