diff --git a/formats/format_g723.c b/formats/format_g723.c
index 615e20052e00300da7dc40220971b84a7e9a474f..dd5a1e6afa70ea0adf2d4dcc59b69070d4c87dd5 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -87,8 +87,8 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext)
 
 static int g723_write(struct ast_filestream *s, struct ast_frame *f)
 {
-	u_int32_t delay;
-	u_int16_t size;
+	uint32_t delay;
+	uint16_t size;
 	int res;
 	/* XXX there used to be a check s->fr means a read stream */
 	if (f->frametype != AST_FRAME_VOICE) {
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 67a54eb489754f02c5180e10ef594d1bef66826e..9ae1398e6e44dc6d703131819f31825753120937 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -229,7 +229,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
 /* SUN .au support routines */
 
 #define AU_HEADER_SIZE		24
-#define AU_HEADER(var)		u_int32_t var[6]
+#define AU_HEADER(var)		uint32_t var[6]
 
 #define AU_HDR_MAGIC_OFF	0
 #define AU_HDR_HDR_SIZE_OFF	1
@@ -266,19 +266,19 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
 static int check_header(FILE *f)
 {
 	AU_HEADER(header);
-	u_int32_t magic;
-	u_int32_t hdr_size;
-	u_int32_t data_size;
-	u_int32_t encoding;
-	u_int32_t sample_rate;
-	u_int32_t channels;
+	uint32_t magic;
+	uint32_t hdr_size;
+	uint32_t data_size;
+	uint32_t encoding;
+	uint32_t sample_rate;
+	uint32_t channels;
 
 	if (fread(header, 1, AU_HEADER_SIZE, f) != AU_HEADER_SIZE) {
 		ast_log(LOG_WARNING, "Read failed (header)\n");
 		return -1;
 	}
 	magic = ltohl(header[AU_HDR_MAGIC_OFF]);
-	if (magic != (u_int32_t) AU_MAGIC) {
+	if (magic != (uint32_t) AU_MAGIC) {
 		ast_log(LOG_WARNING, "Bad magic: 0x%x\n", magic);
 	}
 /*	hdr_size = ltohl(header[AU_HDR_HDR_SIZE_OFF]);
@@ -313,7 +313,7 @@ static int check_header(FILE *f)
 static int update_header(FILE *f)
 {
 	off_t cur, end;
-	u_int32_t datalen;
+	uint32_t datalen;
 	int bytes;
 
 	cur = ftell(f);
@@ -327,7 +327,7 @@ static int update_header(FILE *f)
 		ast_log(LOG_WARNING, "Unable to find our position\n");
 		return -1;
 	}
-	if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(u_int32_t), SEEK_SET)) {
+	if (fseek(f, AU_HDR_DATA_SIZE_OFF * sizeof(uint32_t), SEEK_SET)) {
 		ast_log(LOG_WARNING, "Unable to set our position\n");
 		return -1;
 	}
@@ -346,7 +346,7 @@ static int write_header(FILE *f)
 {
 	AU_HEADER(header);
 
-	header[AU_HDR_MAGIC_OFF] = htoll((u_int32_t) AU_MAGIC);
+	header[AU_HDR_MAGIC_OFF] = htoll((uint32_t) AU_MAGIC);
 	header[AU_HDR_HDR_SIZE_OFF] = htoll(AU_HEADER_SIZE);
 	header[AU_HDR_DATA_SIZE_OFF] = 0;
 	header[AU_HDR_ENCODING_OFF] = htoll(AU_ENC_8BIT_ULAW);
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index dc8884cfa7e9b2a7c0161a96d99e2882fc530571..0160e3b951fc042e81d79926402318405a77d7e0 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -333,17 +333,17 @@ struct oprmode {
 struct ast_option_header {
 	/* Always keep in network byte order */
 #if __BYTE_ORDER == __BIG_ENDIAN
-        u_int16_t flag:3;
-        u_int16_t option:13;
+        uint16_t flag:3;
+        uint16_t option:13;
 #else
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-        u_int16_t option:13;
-        u_int16_t flag:3;
+        uint16_t option:13;
+        uint16_t flag:3;
 #else
 #error Byte order not defined
 #endif
 #endif
-		u_int8_t data[0];
+		uint8_t data[0];
 };
 
 /*! \brief  Requests a frame to be allocated