summaryrefslogtreecommitdiffstats
path: root/base/rand_util_c.h
blob: f16d2647a7c5fa536d8f1e265487550cd41c8d2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_RAND_UTIL_C_H_
#define BASE_RAND_UTIL_C_H_
#pragma once

#include "base/base_export.h"

#ifdef __cplusplus
extern "C" {
#endif

// Note this *should* be in "namespace base" but the function is needed
// from C so namespaces cannot be used.

// Returns an FD for /dev/urandom, possibly pre-opened before sandboxing
// was switched on.  This is a C function so that Native Client can use it.
BASE_EXPORT int GetUrandomFD(void);

#ifdef __cplusplus
}
#endif

#endif /* BASE_RAND_UTIL_C_H_ */