---
name: "uuid_compare"
section: "3"
platform: "linux"
package: "util-linux-libs"
version: "2.42.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/uuid_compare"
---

# uuid\_compare(3)

compare whether two UUIDs are the same

## NAME

uuid\_compare - compare whether two UUIDs are the same

## SYNOPSIS

**#include \<uuid.h\>**

**int uuid\_compare(const uuid\_t** *uu1***, const uuid\_t** *uu2***)**

## DESCRIPTION

*The* **uuid\_compare***() function compares the two supplied uuid variables uu1 and uu2 to each other.*

## RETURN VALUE

*Returns an integer less than, equal to, or greater than zero if uu1 is found, respectively, to be lexicographically less than, equal, or greater than uu2.*

## AUTHORS

*Theodore Y. Ts’o*

## SEE ALSO

**uuid***(3),* **uuid\_clear***(3),* **uuid\_copy***(3),* **uuid\_generate***(3),* **uuid\_is\_null***(3),* **uuid\_parse***(3),* **uuid\_unparse***(3)*

## AVAILABILITY

*The* **libuuid** *library is part of the util-linux package since version 2.15.1. It can be downloaded from* *Linux Kernel Archive \<https://www.kernel.org/pub/linux/utils/util-linux/\>.*
