Skip to content

Commit e1d17a0

Browse files
committed
FreeBSD also has /dev/random and /dev/urandom.
1 parent 6f24a16 commit e1d17a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/subnetcalc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void generateUniqueLocal(sockaddr_union& address,
145145
exit(1);
146146
}
147147

148-
#if defined(__LINUX__) || defined(__linux__) || defined(__linux)
148+
#if defined(__LINUX__) || defined(__linux__) || defined(__linux) || defined(__FreeBSD__)
149149
// ====== Read random number from random device ==========================
150150
const char* randomFile = (highQualityRng == true) ? "/dev/random" : "/dev/urandom";
151151
FILE* fh = fopen(randomFile, "r");

0 commit comments

Comments
 (0)